Open jamesjuett opened 2 years ago
#include <iostream> using namespace std; class A { virtual void foo() { cout << "hi" << endl; } }; class B : public A { void foo() override { A::foo(); cout << "hi" << endl; } }; int main() { B b; b.foo(); }