上一页 1 ··· 18 19 20 21 22
摘要: #include using namespace std;class class1 { public: class1(){ } class1(int i ){ } void show(){ coutshow(); return 0;} 总结一下:1. 当使用类的无参构造函数来实例化对象时,... 阅读全文
posted @ 2014-04-12 12:40 Birding 阅读(523) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 struct struct1{ 4 int data1 ; 5 double data2 ; 6 struct1(){ 7 (*this).data1 = data1 ; 8 (*this).data2 = data2 ; 9 coutshowClass2();74 /* test struct inherit class */75 //struct4 onestruct4 ;76 //onestruct4.showCla... 阅读全文
posted @ 2014-04-11 23:53 Birding 阅读(971) 评论(1) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22