On 5/22/2015 9:28 AM, Juha Nieminen wrote:
> [..]
> If you really want one single class variable to exist independently
> of the class itself, make it 'static'. (That makes it a class variable
> rather than a member variable.)
A nitpick: a static (or class) variable is still a *member* variable.
To get to it one still needs to use either an instance of the class or
the name of the class. Yes, an instance is not strictly needed to gain
access to a static data member. The member "variables" not qualified as
static are formally referred to as "non-static data members" to
emphasize the difference with static ones.
I wonder what book out there exists that uses the term "class variable"
as opposed to "member variable" to refer to *static data members* in
comparison to *non-static data members*...