#include using namespace std; // this demonstrates that the vtable is initalized before the constructor is called struct A { virtual void invoke() { std::cout << "Goodbye from A" << endl;} A () { cout << "calling virtual function from creator" << endl; invoke(); } }; int main() { A a; return 0; }