上一页 1 ··· 81 82 83 84 85 86 87 88 89 ··· 207 下一页

2011年9月6日

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&() const; 阅读全文

posted @ 2011-09-06 10:37 原来... 阅读(1758) 评论(0) 推荐(0)

上一页 1 ··· 81 82 83 84 85 86 87 88 89 ··· 207 下一页

导航