Original Post
Hi guys, is this legal:
class CMyClass
{
...some stuff
} *LPMYCLASS;
Then I can just go LPMYCLASS for a pointer declaration.
{
typedef CMyClass* CMyClassPtr;
CMyClassPtr p(new CMyClass());
delete p;
}
{
typedef shared_ptr<CMyClass> CMyClassPtr;
CMyClassPtr p(new CMyClass());
}//end of scope shared_ptr will clean up memory for you
quote:
Original post by Willm
Whats wrong with passing a non-const reference, if you plan to change it?
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more