请问auto_ptr的reset该怎么使用
为什么我在使用auto_ptr的reset时编译不通过?
#include "stdafx.h "
#include <iostream>
#include < memory >
using namespace std;
int main(int argc, char* argv[])
{
auto_ptr < int > p_auto_int; //默认构造
p_auto_int.reset( new int( 100 ) );
......
}
为什么会报错:error C2039: 'reset ' : is not a member of 'auto_ptr <int> '
[解决办法]
VC6把,还是早点扔了换VC7以上或者devcpp。
如果您真不肯换,那就认真查msdn里auto_ptr.