title: Realloc equivalent in C++
body: <p>Yes, another <code>realloc</code> vs. <code>std::vector</code> question. I know what you're going to say, and I agree, forget manual memory allocation, and just use a <code>std::vector</code>. Well unfortunately my professor has forbidden me to use anything from the STL for this assignment.</p>
  
  <p>So yeah, I have a dynamic array of <code>T</code> and I need it to be resizable, and I can't use <code>std::vector</code>. I could return to the dark ages and do the whole thing with <code>malloc</code> and family, but if I could use <code>new</code> that would be totally awesome.</p>
  
  <p>I've read plenty of threads where everyone said "no, you can't do it, use <code>std::vector</code>", but they were all posted before August 2011, and I'm hoping against hope that something might have changed since the dawn of C++11. So tell me, am I in luck, or do I have to revert to C style memory allocation?</p>