

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


}
stu.getdata(); stu.putname(); }
In the line class student : public person change public to private and run the program. In the line class student : public person change public to protected and run the program. If it shows an error note what the error says.
In function getdata of class student, change person::getname() to person.getname(). Run to see output ( REMINDER :: is the scope resolution operator which is used when function is defined in one class and we want to use it in another class. (. operator) is used to access method or variables of an object ) /////////////////////////////////////////////////////////////////////////////////////////////////////////