Hey, I'm having a problem with auto_ptr. Heres the code I normaly use to create an instance of a class:
And heres when I tried to make it into an auto_ptr:
CONNECTION * NewConn = new CONNECTION(Arg->SFD, Arg->CLA);
When I compile I get the error:
auto_ptr<CONNECTION> NewConn (new CONNECTION(Arg->SFD, Arg->CLA) );
Is there any changes I need to make to my CONNECTION class? Or have I just declared this wrong?
C:\SWEBS\SWEBSEngine\Source\SWEBSMain.cpp(441) : error C2451: conditional expression of type 'class std::auto_ptr<class CONNECTION>' is illegal
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.