title: Vector C++ Memory Allocation
body: <p>I want to create a vector of elements representing a certain structure.</p>
  
  <p>The thing is that I don't know how many elements the structure will have, since the number will change very often, and I don't really know how to create a vector.</p>
  
  <p>How to make that?</p>
  
  <p>In order to make it more clear:</p>
  
  <p>I saw that when creating a vector, you do something like this:</p>
  
  <pre><code>std::vector&lt;structureType&gt; vectorName(nrOfElements);
  </code></pre>
  
  <p>I don't know the number of elements and what to write there, between brackets.</p>