title: Removing Empty Elements from a Vector of Strings
body: <p>I'm attempting to make a small program that processes INI files, for use in a later project, first by reducing its size once loaded into memory. Thus,</p>
  
  <p>where vLine is a vector containing the file contents</p>
  
  <pre><code>for (unsigned int i = 0; i &lt; vLine.size(); i++)
  {
     if (!vLine[i].find(';', 0))
     {
         vLine[i].erase();
     }
  }
  </code></pre>
  
  <p>Upon printing vLine, I'll be left with spaces where once a line beginning with a semi-colon existed, such as</p>
  
  <pre><code>1.    
  2. property
  3. property
  4. 
  5. property
  </code></pre>
  
  <p>Using resize() appears to remove the last element from the list rather than remove these empty portions. The same problem exists where I remove lines that only contain whitespace with erase().</p>
  
  <p>Is it possible to remove these empty elements while preserving the order of vLine?</p>
  
  <p>(Apologies for not using iterators in this.)</p>