title: How to expand an array dynamically in C++? {like in vector }
body: <p>Lets say, i have </p>
  
  <pre><code>int *p;
  p = new int[5];
  for(int i=0;i&lt;5;i++)
     *(p+i)=i;
  </code></pre>
  
  <p>Now I want to add a 6th element to the array. How do I do it?</p>