智能指针
来源:互联网 发布:scratch趣味编程课程 编辑:程序博客网 时间:2024/04/25 01:19
今天开始写c++ effective的读书笔记。
以对象管理资源需要pointer-like object,即智能指针。
#include "stdafx.h"
#include "iostream"
#include "memory"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int* p=new int(12);
std::auto_ptr<int> pint(p);
cout<<*pint<<endl;
cin.get();
return 0;
}
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 智能指针
- 高效SQL查询之索引(VI)
- do while not rs.eof
- WPF game developing 学习备注
- 高效SQL查询之索引(II)
- javascript keycode大全
- 智能指针
- 高效SQL查询之索引(I)
- 高效SQL查询之索引(III)
- (转)CENTOS4配置JSP教程
- 清空压缩数据表
- Android中发送和接收短信
- JavaScript调试方法之一
- MSSQL添加字段说明
- SQL查表名、字段名、表说明、字段说明