fork download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. struct obj
  5. {
  6. std::string name;
  7. int age;
  8. float money;
  9. obj():name("NO_NAME"),age(0),money(0.0f){}
  10. obj(const std::string& _name, const int& _age, const float& _money):name(_name),age(_age),money(_money){}
  11. };
  12.  
  13. int main(int argc, char* argv[])
  14. {
  15. std::vector<obj> v;
  16. for( int i = 0; i < 4000000; ++i )
  17. {
  18. v.push_back(obj("Jon", 45, 500.6f));
  19. }
  20. return(0);
  21. }
Success #stdin #stdout 1.61s 96768KB
stdin
Standard input is empty
stdout

Standard output is empty