- 博客(2)
- 资源 (3)
- 收藏
- 关注
原创 C++体会(二) 函数执行过程探幽
#include using namespace std;class CA{public: CA() { cout<<"default constructor"<<endl; } CA(string d) { cout<<"param constructor"<<endl;} CA(const CA &ca) { cout<<"copy constructor!
2009-11-07 23:04:00 270
原创 C++体会(1) iostream对象不提供拷贝构造函数
C++中,1.iostream的对象不存在拷贝构造函数,因此在重载>操作符的时候,出入的参数必须为ostream的引用,不能为ostream的对象。否则,编译不过。也正是因为这样,重载函数返回值必须为ostream的引用,不能为对象。值传递ostream,会出现提示,转到ios_base的生命中,看到这样的几句话: private: ios_base(const ios
2009-11-07 22:46:00 877
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人