What does it mean when a member variable or a member function of a class is static?
Code:// .h file class example { public: static int doSomething(); // What does that static mean here? private: static int myVariable; // What does that static mean here? } // .cpp file // If I dont do this, I get an compiler error. Why do I need to do it? int example::myVariable; int example::doSomething() { // Can only acces static member variables. Why? return 2; }