+ 1

is there a difference between selection ( . ) operator and -> ?

25th Jul 2016, 2:33 AM
Cristi
Cristi - avatar
2 odpowiedzi
+ 1
-> is used for pointers for returning ,while . is used for connecting...
25th Jul 2016, 4:44 AM
sagar
sagar - avatar
+ 1
-> is used for class pointers such as: MyClass * myObjPtr; and to use its members or variables you call them with the arrow operator like this: myObjPtr->DoSomething (); syntactically, both pretty much are the same, just a few extra characters.
25th Jul 2016, 5:01 PM
destro