Created
September 26, 2015 10:49
-
-
Save kaskavalci/374f27b201753e59dbf3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MyClass.h | |
class MyClass { | |
public: | |
static int GetVar() { | |
return shared_variable; | |
} | |
private: | |
static int shared_variable; | |
}; | |
// MyClass.cpp | |
#include "MyClass.h" | |
int MyClass::shared_variable; // Also do any initialization if needed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment