Is virtual table will be created for the derived class which is not having any virtual function except parent class a virtual function which is not overridden by derived class.
for ex:
class A{
public:
virtual void show();
};
class B : public A
{
};
How about the virtual table of class B.
There is no standard answer for your question. Its really depending on the compiler version. There is no standard ABI specified in C++. If you are interested deeper please take a look at "Itanium C++ ABI" or try to find the answer on your own by looking into the asembler code.
There was even a proposal to define portable ABI for C++
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4028.pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With