Size of class is 8 bytes only which is the size of vitual pointer? and what about size of vtable which is in the class?
#include <iostream>
using namespace std;
class Base
{ public:
virtual void f1(){}
virtual void f2(){}
};
class Derive: public Base
{
void f1(){}
void f2(){}
};
int main()
{
cout<<sizeof(Base)<<endl;
}