摘要: 注:转载自http://blog.csdn.net/lwbeyond/article/details/6202256一. 什么是拷贝构造函数首先对于普通类型的对象来说,它们之间的复制是很简单的,例如:[c-sharp] view plaincopyprint?int a = 100; int b = a; int a = 100;int b = a; 而类对象与普通对象不同,类对象内部结构一般较为复杂,存在各种成员变量。 下面看一个类对象拷贝的简单例子。[c-sharp] view plaincopyprint?#include usingnamespace std; class CEx... 阅读全文
posted @ 2013-08-13 17:37 CoolRandy 阅读(404) 评论(0) 推荐(0)