>> cout << (dynamic_cast <Person*>(p))->getAverage();
Look what are you doing. You are casting a Person pointer with Person only. What is the effect?
change it to cout << (dynamic_cast <Student*>(p))->getAverage();
siddhant3s
Practically a Posting Shark
816 posts since Oct 2007
Reputation Points: 1,486
Solved Threads: 140