#include <iostream>
using namespace std;

struct Base {
	virtual void foo() {
		cout << "Base::foo()" << endl;
	}
	
	virtual void bar() {
		cout << "Base::bar()" << endl;
	}
};

struct Derived : public Base {
	void bar() override {
		cout << "Derived::bar()" << endl;
		Base::bar();
	}
};

int main() {
	Derived d;
	d.foo();
	d.bar();
	return 0;
}