language: C++11 (gcc-4.7.2)
date: 179 days 8 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
#include <vector>
 
struct obj
{
  std::string name;
  int age;
  float money;
  obj():name("NO_NAME"),age(0),money(0.0f){}
  obj(const std::string& _name, const int& _age, const float& _money):name(_name),age(_age),money(_money){}
};
 
int main(int argc, char* argv[])
{
  std::vector<obj> v;
  for( int i = 0; i < 4000000; ++i )
  {
    v.push_back(obj("Jon", 45, 500.6f));
  }
  return(0);
}