Hi,
Can I declare a class as a static Class...
Also Can I declare a member of a class as a static class variable..
I want to do something like this..
class test
{
};
class test1
{
public:
static test myTest;
};
I hope yes. Defining class member as static means that this member of all objects of that class resides on the same memory location and value changed in one object is accessible from other objects. There should be no difference what is the type of the member - class or simple datatype.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.