Home > Back-end >  Smart Pointers to return, return NULL error C2664 errors
Smart Pointers to return, return NULL error C2664 errors

Time:09-25

Code for the typedef STD: : auto_ptr & lt; CVst> CVstPtr;
CVstPtr SendBJBst ()
{
return NULL;
}
Error: error C2664: "STD: : auto_ptr & lt; _Ty & gt; : : auto_ptr (STD: : auto_ptr & lt; _Ty & gt; & amp;) Throw () ": parameters can not be 1 from" int "into" STD: : auto_ptr & lt; _Ty & gt; & amp;"
1> With
1>
1> _Ty=DsrcFW: : CVst
1> ]
How to solve, please teach


CodePudding user response:

 return (CVstPtr) NULL; 

CodePudding user response:

Don't use the auto_ptr
Switching from
  • Related