+ 2
Why should we define static member variable outside the class?
Static variables are initialized to 0 and defined after class definition. So, why compiler don't show error like "...was not defined in this scope"?
1 Answer
+ 2
I am not sure If I understand well,but the c++ is not strict object oriented language.In c++ there is a rule you use a variable there you currently need it. It is not necessary construct an object for it which the variable belong as a member.