•#include
"Foo.H"
#include <iostream>
using namespace std;
A::foo()
{
cout <<
"A::foo()" << endl;
}
B::foo()
{
cout <<
"B::foo() called" << endl;
A::foo();
}
•So, if we have an instance "b" of class
"B", calling
•b.foo();
•will output
•B::foo() called
A::foo() called
•