PDA

View Full Version : is the dot operator connect the class object and a member of that class?



saneha
05-02-2011, 06:41 AM
is the dot operator connect the class object and a member of that class?

Vuhelper
05-02-2011, 06:41 AM
Member access specifier is a C++ Operator that is used to access class member functions via the objects belonging to the same class. For example we have a class, Student......... now we create one of its object like Student astudent; Now you know very well that "astudent" is an object of class "Student" and let suppose there is a member function like "roll no()" of this class, now if "astudent" wants to access "roll no()" , then, the syntax should be like this......... astudent. roll no(); You see "." is the member access specifier which act as an operator used to provide access of member function to the object.