boost库之scoped_array

来源:互联网 发布:java seversocket 编辑:程序博客网 时间:2024/05/17 22:37
// scoped_array_Exam.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "boost/smart_ptr.hpp"using namespace boost;int _tmain(int argc, _TCHAR* argv[]){// scoped_array包装了new[]操作符(不是单纯的new)在堆上分配的动态数组scoped_array<int> sa(new int[1000]);return 0;}

原创粉丝点击