title: C++ new object every time function is called?
body: <p>What I want is a function that makes a new different instance every time i call it (with a different name...) </p>
  
  <p>Just like this: </p>
  
  <pre><code>void person::new_person(){
    person *(id+index) = new person(name_temp, age_temp, quote_temp);
  }
  </code></pre>
  
  <p>But it doesn't work... I don't know how should i do that... (index is add by one every time i make a new instance).
  And i realized every time i make a pointer and just add spaces on it, like that:</p>
  
  <pre><code>int*p;
  *(p+1) = 5;
  </code></pre>
  
  <p>It compiles, but freezes while running(I supose its getting memmory thats not allowed), so that "person *(id+index)" may not work too.
  What do you think? </p>