【初心者歓迎】C/C++室 Ver.38【環境依存OK】
■ このスレッドは過去ログ倉庫に格納されています
0345デフォルトの名無しさん
2007/06/11(月) 12:52:34class bbb : public aaa {
public:
bbb() {printf("%p: [%s]: %s called\n", this, "bbb", "constructor");}
- bbb(const bbb &b) {printf("%p: [%s]: %s called\n", this, "bbb", "copy constructor");}
+ bbb(const bbb &b): aaa (b) {printf("%p: [%s]: %s called\n", this, "bbb", "copy constructor");}
~bbb() {printf("%p: [%s]: %s called\n", this, "bbb", "destructor");}
};
■ このスレッドは過去ログ倉庫に格納されています