Function by which we get values for object strictly follow the data hiding rule in oops

Can the function by which we get values for object strictly follow the data hiding rule in oops?if no,why?
e.g
void student ::getdata()
{
cout<<"enter name";
cin>>name;
-
-
-
-
}
void main()
{
student s;
s.getdata();
getch();
}

 

This Question is not yet answered!

 
 

Related Answered Questions

 

Related Open Questions