fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Y {
  5. private:
  6. static int y;
  7. public:
  8. static int getY() { return y;}
  9. };
  10.  
  11. int Y::y = 6;
  12.  
  13. int main() {
  14. std::cout << Y::getY() << std::endl;
  15. // your code goes here
  16. return 0;
  17. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
6