Quote:Original post by Bregma
Did you define your consts, or did you just declare them.class StatID{public: static const int A = 1; static const int B = 2;};
That's defining them, not declaring them.
Quoted for being almost the right answer. That is how you should write it, but it's still just declarations, not definitions. Although most compilers seem to let you elide it, according to the final draft standard you still need the definitions too:
// statid.hclass StatID{ public: static const int A = 1; static const int B = 2; // ...};// statid.cppconst int StatID::A;const int StatID::B;// ...
Σnigma