title: How do I add item into the array in C++ with unlimited size?
body: <p>In python, there's a function call <strong>append</strong> to add an item into the back of the list. Is there <strong>similar function in C++</strong> to add an item into the array? Or is there any other <strong>alternative method</strong> so that I can add item into an array with undefined size?</p>
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main(){
      int list1[] = {1,2,3,4};
      //a function that add an item at the back of the array;
      cout&lt;&lt;list1[4]&lt;&lt;endl;
      return 0;
  }
  </code></pre>