60 678
Assignments Done
97,7%
Successfully Done
In April 2018

Answer to Question #554 in C++ for Irene

Question #554
What is the difference between operators “.” and “->”? When should each of them be used?
Expert's answer
Operators “.” and “->” are class member selectors. The first is used to access the members of the class directly from the object. The second – from the pointer to this object. However, if the class is non-trivial, you have the possibility to overload the operator “->” and return a pointer to another object, whose methods and will be called.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions