What exactly ' -> ' this do ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What exactly ' -> ' this do ??

9th Jan 2017, 2:51 PM
Siddharth Naithani
Siddharth Naithani - avatar
3 Answers
+ 2
The arrow operator dereferences the pointer and calls the dot operator. It's basically a short hand for this: (*my_pointer).my_func()
9th Jan 2017, 2:54 PM
James Durand
James Durand - avatar
+ 2
I guess the shorthand is more like: (*pointer).member for pointer->member
9th Jan 2017, 3:07 PM
Free Boro
Free Boro - avatar
0
it calls the memory address of the assigned variable... like this-> a or (*this).a ... they r the same....
18th Jan 2017, 7:56 AM
DEF4LT_
DEF4LT_ - avatar