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