 <p>The size of a vector is split into two main parts, the size of the container implementation itself, and the size of all of the elements stored within it.</p> <p>To get the size of the container implementation you can do what you currently are:</p> <pre><code>sizeof(std::vector&lt;int&gt;); </code></pre> <p>To get the size of all the elements stored within it, you can do:</p> <pre><code>MyVector.size() * sizeof(int) </code></pre> <p>Then just add them together to get the total size.</p>