// EarlyBinding - calls to overloaded member functions // are resolved based on the type of // the object #include #include class Student { public: double calcTuition() { return 0; } }; class GraduateStudent : public Student { public: double calcTuition() { return 1; } }; int main(int nArgc, char* pszArgs[]) { // the following expression calls // Student::calcTuition(); Student s; cout << "The value of s.calcTuition is " << s.calcTuition() << "\n"; // this one calls GraduateStudent::calcTuition(); GraduateStudent gs; cout << "The value of gs.calcTuition is " << gs.calcTuition() << "\n"; return 0; }