![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
文章平均质量分 65
find_
在校大学生计算机嵌入式专业
展开
-
c++智能指针
auto_prt :它是(它所指向对象的拥有者),所以当自身对象被摧毁时候,该对象也将遭受摧毁,要求一个对象只有一个拥有者,注意:auto_prt 不能使用new 来分配对象给他#include #include using namespace std;template void bad_print(auto_ptr f){cout}原创 2013-03-23 22:47:20 · 517 阅读 · 0 评论 -
C++复制构造函数
今天看了effect C++看到了,不知构造函数,就回忆了一下,然后再网上看了一些资料,就来总结一下class Widget{public:Widget(); //default 构造函数Widget(const Widget & rhs); //copy 构造函数Widget& operator=(const Widget& rhs); //copy a原创 2013-01-14 19:26:18 · 431 阅读 · 0 评论