// QUESTION: Is there a class variable in C++? // ANSWER: CLASS VARIABLES are called STATIC MEMBERS in C++. For example: #include using namespace std; class myClass { public: static int i; // static member void test() const; }; void myClass::test() const { cout << "Value is " << i << endl; } int myClass::i; int main() { myClass::i = 3; myClass c; c.test(); myClass b; b.test(); getchar(); }