Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Base {
- public:
- virtual void function1() {};
- virtual void function2() {};
- };
- class A : public Base {
- void function1() override {};
- };
- class B : public Base {
- void function2() override {};
- };
- Virtual table for Base {
- function1() = Base::function1();
- function2() = Base::function1();
- };
- Virtual table for A {
- function1() = A::function1();
- function2() = Base::function1();
- };
- Virtual table for B {
- function1() = Base::function1();
- function2() = B::function1();
- };
- int main() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement