fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct foo
  5. {
  6. foo () { cout<<"Call before main"<<std::endl; }
  7. };
  8.  
  9. static foo f;
  10.  
  11. int main() {
  12. // your code goes here
  13. cout<<"Call in main"<<std::endl;
  14. return 0;
  15. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
Call before main
Call in main