KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have these C++ classes: class Base { protected: static int method() { static int x = 0; return x++; } }; class A : public Base { }; class B : public Base { }; Will the x static variable be shared among A and B , or will each one of them have it's own independent x variable (which is what I want)?
Tags (comma-separated)
Save Edits
Cancel