There is such code:
#include class A{ int a; int fun(){} }; class B{ int a; virtual int fun(){} }; int main() { std::
Any class with a virtual function needs a pointer to the vtable for that class. Therefore, there is a hidden member that's the size of the pointer.
http://en.wikipedia.org/wiki/Virtual_method_table