fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class A
  5. {
  6. public:
  7. A(int& x)
  8. {
  9. x++;
  10. }
  11. };
  12.  
  13. int main() {
  14.  
  15. int x = 0;
  16. for (int i = 0; i < 100000000; i++)
  17. new A(x);
  18.  
  19. cout << x;
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 2.38s 3140096KB
stdin
Standard input is empty
stdout
100000000