class with virtual functions takes more place
<p>There is such code:</p>

<pre><code>#include &lt;iostream&gt;

class A{
    int a;
    int fun(){}
};

class B{
    int a;
    virtual int fun(){}
};

int main()
{
    std::cout &lt;&lt; sizeof(A) &lt;&lt; " " &lt;&lt; sizeof(B) &lt;&lt; std::endl;
    std::cin.get();
    return 0;
}
</code></pre>

<p>The output is:</p>

<pre><code>4 8
</code></pre>

<p>Why class B is 4 bytes bigger than class A?</p>
