摘要:
1 #include 2 using namespace std; 3 struct struct1{ 4 /* 5 struct1(){ 6 cout<<"this is output by struct1 !"; 7 } 8 if add this code block , such errors like 'you must initlizer data number of struct1 9 10 by constructor in g++98' will occor in compile time,11 */12 ... 阅读全文
posted @ 2014-04-12 12:41
Birding
阅读(2699)
评论(0)
推荐(0)
摘要:
#include using namespace std;class class1 { public: class1(){ } class1(int i ){ } void show(){ coutshow(); return 0;} 总结一下:1. 当使用类的无参构造函数来实例化对象时,... 阅读全文
posted @ 2014-04-12 12:40
Birding
阅读(533)
评论(0)
推荐(0)

浙公网安备 33010602011771号