使用派生类对象通过成员函数指针调用基类虚函数之不可能性的证明
希望大家没有被这么拗口的标题吓到:)。 本文源于论坛上的这个问题: struct base { void foo() { cout << "base::foo" << endl; } virtual void bar() { cout << "base::bar" << endl; } }; struct derived : base { virtual void bar() { cout << "derived::bar" << endl; }
