摘要:
假如存在以下代码:class Test{};int main(){ Test A; Test B(A); //调用拷贝构造函数 Test C = A; //调用拷贝构造函数 B = A; //此处才调用赋值构造函数}以下给出测试代码: 1 #include <iostream> 2 #include <stdlib.h> 3 using namespace std; 4 5 class AAA 6 { 7 public: 8 AAA() 9 {10 value++;cout << "value is " << value... 阅读全文
posted @ 2013-06-14 00:05
飞鼠溪
阅读(361)
评论(0)
推荐(0)

浙公网安备 33010602011771号