// SeparatedMain - demonstrated an application separated // into two parts - the main() part #include #include #include "student.h" double fn(Student&); int main(int nArgc, char* pszArgs[]) { // the following expression calls // fn() with a Student object Student s; cout << "The value of s.calcTuition when\n" << "called virtually through fn() is " << fn(s) << "\n\n"; // the following expression calls // fn() with a GraduateStudent object GraduateStudent gs; cout << "The value of gs.calcTuition when\n" << "called virtually through fn() is " << fn(gs) << "\n\n"; return 0; }