¡@

Home 

c++ Programming Glossary: staticvar

Are static variables in a base class shared by all derived classes?

http://stackoverflow.com/questions/1390913/are-static-variables-in-a-base-class-shared-by-all-derived-classes

classes If I have something like class Base static int staticVar class DerivedA public Base class DerivedB public Base Will both.. public Base Will both DerivedA and DerivedB share the same staticVar or will they each get their own If I wanted them to each have.. this question They will each share the same instance of staticVar . In order for each derived class to get their own static variable..