Thread
:
Using auto_ptr or shared_ptr to allocate memory to a Structure
View Single Post
xpi0t0s
Mentor
25Nov2008,20:23
Oh I see. You don't. You initialise an auto_ptr from an existing pointer, either with
T *foo=new T;
auto_ptr<T> bar(T);
or with:
auto_ptr<T> bar(new T);