設(shè)計一個圓類?
#include #include usingnamespacestd; classCircle { public: //聲明顯式構(gòu)造函數(shù) explicitCircle(constpair&Point,constunsignedintunRadius) { this->m_Point=Point; this->m_unRadius=unRadius; } //聲明拷貝構(gòu)造函數(shù) Circle(constCircle&cirObj) { this->m_Point=cirObj.m_Point; this->m_unRadius=cirObj.m_unRadius; } //賦值運算符重載 Circle&operator=(constCircle&cirObj) { this->m_Point=cirObj.m_Point; this->m_unRadius=cirObj.m_unRadius; return*this; } //輸出操作符重載 friendostream&operator<