I was looking for some information about virtual table, but can\'t find anything that is easy to understand.
Can somebody give me good examples(not from Wiki, please) wi
To answer your headline question - you don't, and the C++ Standard does not specify that you must be provided with one. What you do want is to be able to say:
struct A {
virtual ~A() {}
virtual void f() {}
};
struct B : public A {
void f() {}
};
A * p = new B;
p->f();
and have B::f called and not A::f. A virtual function table is one way of implementing this, but is frankly not of interest to the average C++ programmer - I only ever think about it when answering questions like this.