作业代码 #include <iostream> using namespace std; class Shape { protected: double cir; double area; public: //无参构造 Shape() {cout<<"无参构造"<<endl;} //有参构造 Shape(double c, double a):cir(c), area(a){cout<<"有参构造"<<endl;} //析构函数 ~Shape(){cout<<"析构函数"<<endl;} //拷贝构造 Shape(const Shape&other):cir(other.cir), area(other.area) { cout<<"拷贝构造"<<endl; } //拷贝赋值 Shape& operator=(const Shape& other) { if(this != &other) { this->cir = other.cir; this->area = other.area; cout<<"拷贝赋值"<<endl; } return *this; } //移动赋值...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with class
Contact class, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack