1 #include<iostream> 2 int n=0; 3 using namespace std; 4 class Cbox{ 5 int a ; 6 int b ; 7 int c ; 8 public: 9 int g ; 10 Cbox(int d):Cbox(){cout<<"dddd"<<endl;} 11 Cbox(){cout<<"dddd1"<<endl;}; 12 ~Cbox(){cout<<a<<" "<<b<<" "<<c<<endl;} 13 }; 14 15 16 17 int main(){ 18 int aa=10; 19 Cbox a(10) ; 20 21 //Cbox b(a);//跟 Cbox b=a; 结果一样 22 23 24
![](https://i-blog.csdnimg.cn/blog_migrate/9c5b28918d68baaee6e1e0bc892bfcd7.png)
25 26 27 }