Static member variable in class?
Managed C++/CLI
2
Posts
2
Posters
2
Views
1
Watching
-
Is the static member variable in class will same for all objects of that class?
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother Teresa -
Is the static member variable in class will same for all objects of that class?
Nice talking to you. :-O
If you judge people, you have no time to love them. -- Mother Teresayes static member variables are same for all objects of the class. As the scope of static member variable is class level not of object level. Each object of the class can access and share static member of class. Static member is accessed via class name and not by object name, like //static member accessment className.staticmember = someValue //object level variable. objName.objMember
-shoaib-