title: Is a std::vector pointer reliable?
body: <p>Say I have this:</p>
  
  <pre><code>Object *myObject;
  std::vector&lt;Object&gt; objects(99);
  
  ....
  myObject = &amp;objects[4];
  </code></pre>
  
  <p>Would it be safe to assume that myObject's pointer will always be valid no matter how big objects[] gets and if I remove some, as long as I do not ever erase() the actual object pointed to by myObject? Or does it work differently? If the above does not work, how else could I achieve this? It's because in my design, I want a child to have a pointer to its parent, which is assigned by the parent when the child is added, however the parents are in a std::vector, I need random access. Would a std::list be better in my case?</p>
  
  <p>Thanks</p>