title: C++ dynamic size array
body: <p>I need your help with C/С++ arrays. I've been programming in Python for three years, and its array (which is called <code>list</code>) is pretty easy to work with.</p>
  
  <pre><code>&gt;&gt;&gt; array = [1,2,3,4]
  &gt;&gt;&gt; array.append(5)
  &gt;&gt;&gt; array
  [1,2,3,4,5]
  </code></pre>
  
  <p>As I've read in C/C++ I need to create a pointer to array. Could you, please, make a small sketch of class which contains array of <code>char</code> and has only one method append, which is called <code>append</code> and receives a <code>char</code> as a parameter. This method increases size of array by 1 and adds the given <code>char</code> to this array.</p>
  
  <p>Someone may think that this is a homework, but I just can't understand the principle of how arrays, pointers and memory allocation work. I guess it's not hard, but it's hurd after languages like Python, because I didn't care about such things in Python. Could you, please, provide a small piece of code with explanations?</p>
  
  <p>Thanks in advance!</p>