fork download
  1. #include <iostream>
  2. class A
  3. {
  4. public:
  5. static int a;
  6. static int b;
  7. };
  8.  
  9. int A::a = 200;
  10. int a = 100;
  11. int A::b = ::a;
  12. int main(int argc, char* argv[])
  13. {
  14. std::cout << A::b << std::endl;
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 4536KB
stdin
Standard input is empty
stdout
100