how define static member in case there not header file ?
the code:
class myclass { }; int myclass::staticmember; // error: class myclass has no member staticmember!
any help?
this work:
// // inside .cpp file // class myclass { static int staticmember; }; int myclass::staticmember;
Comments
Post a Comment