fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. struct S
  5. {
  6. S() { std::cout << i++ << std::endl; }
  7. static int i;
  8. };
  9.  
  10. int S::i = 0;
  11.  
  12. int main() {
  13.  
  14. std::vector<S> s(10);
  15. return 0;
  16. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
0
1
2
3
4
5
6
7
8
9