Which STL object or memory management to be used for dynamic entities
<p>I am developing applications for large scale computing and have some specific questions regarding the choice of STL objects and/or better memory management techniques to minimize compute resources.</p>

<p>Specifically, my question is the following: I am currently using a STL vector obj to store data from a file which looks like this:</p>

<pre><code>x x x x 0 0 0; x x x 0 0 0 0; x x x x x x x;.........
</code></pre>

<p>I want to make this into:</p>

<pre><code>x x x x; x x x; x x x x x x x;............
</code></pre>

<p>Is there a memory effective and fast way to do this (want to use least amount of memory possible)? Can I make inplace changes? The size of data (including zeros) between each colon in the file is constant.</p>
