bal*_*alu 15 c++ arrays auto-ptr
我正在使用auto_ptr<>它使用类指针类型的数组,所以我如何为它赋值.
auto_ptr<>
例如 auto_ptr<class*> arr[10];
auto_ptr<class*> arr[10];
如何为arr数组赋值?
arr
Arm*_*yan 17
你不能将auto_ptr与数组一起使用,因为它delete p不会调用delete [] p.
delete p
delete [] p
你想要boost :: scoped_array或其他一些boost :: smart_array :)
归档时间:
14 年,10 月 前
查看次数:
7046 次
最近记录: