标签:style blog color io div sp log amp on
#include<stdio.h> class A { private: const A& operator=(const A&); }; int main() { A a; A b = a;//ok,实际上是A b(a),即调用拷贝构造函数 A c; c = a;//error,因为‘=‘已被声明为私有 return 0; }
标签:style blog color io div sp log amp on
原文地址:http://www.cnblogs.com/johnsblog/p/3952187.html