1234567891011121314
struct A{ static int a; int Get_a(){ return a; // do something with a } }; struct B:public A{ static int a; }; int main(){ B obj; obj.Get_a(); }
1234
struct B:public A{ static int a; int Get_a(){ return a; } // 'a' is B::a here };