Is it possible in C++ to have one vtable shared by multiple classes? As per my understanding if a class is having a virtual function then it will generate a vtable.So every class should have its own vtable.
Vtables are an implementation detail. C++ doesn't have vtables, it has virtual functions. Vtables just happen to be the most common (if not only) implementation, and the details differ.
What is it that you actually want to achieve?
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