Thursday, May 20, 2010

Virtual Function

Share Orkut
19. Create a base class called student. Use the class to store the name, dob, rollno and includes member functions getdata(), displayresult(). Derive two class pg and ug from student. Make dispalyresult() as virtual function and redefine this function in the derived class to suite the requirements.

No comments:

Post a Comment