Cpp static variables

From wikinotes
Revision as of 23:05, 29 November 2018 by Will (talk | contribs) (Created page with "In CPP, class variables (variables that are shared by all instances of class) are '''initialized''' outside of the class. <syntaxhighlight lang="cpp"> int MyClass::var=0; </...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In CPP, class variables (variables that are shared by all instances of class) are initialized outside of the class.

int MyClass::var=0;