C++空类中的默认函数
摘要:
定义一个空的C++类,例如 class Empty { } 一个空的class在C++编译器处理过后就不再为空,编译器会自动地为我们声明一些member function,一般编译过去就相当于 class Empty { public: Empty(); // 缺省构造函数 Empty( const Empty& ); // 拷贝构造函数 ~Empty(); // 析构函数 Empty& operator=( const Empty& ); // 赋值运算符 Empty* operator&(); // 取址运算符 const Empty* operator&a 阅读全文
posted @ 2013-09-26 21:48 新一 阅读(575) 评论(0) 推荐(0)
浙公网安备 33010602011771号