摘要: C++类中,有时候使用到传值调用(对象实体做参数),遇到这种情况,可要小心了!特别是当你所传值的对象生命周期较长,而非临时对象(生命周期段)的时候。来看看下面的情况:#include using namespace std;class Text{private:char* str;public:Te... 阅读全文
posted @ 2014-06-28 13:57 guang_blog 阅读(954) 评论(0) 推荐(1) 编辑