namespace Global {
int globalVar = 10;
}
class MyClass {
public:
static int staticVar;
};
int MyClass::staticVar = 20;
class MyClass {
public:
static int getStaticVar() {
return staticVar;
}
static void setStaticVar(int value) {
staticVar = value;
}
private:
static int staticVar;
};
int MyClass::staticVar = 20;