Where is the correct place to initialize a class data member? I have the class declaration in a header file like this:
Foo.h:
class Foo { private: in
You're attempting to initialize an instance member via a static initialization construct. If you want this to be a class level variable (static) then precede the variable with the static keyword.
class Foo { private: static int myInt; };