What does that sign do and where is it used?
->
OR
-->
I cannot remember which one is used in C++
Printable View
What does that sign do and where is it used?
->
OR
-->
I cannot remember which one is used in C++
In fact, an expression involving the member-selection operator (->) is a shorthand version of an expression using the period (.) if the expression before the period consists of the indirection operator (*) applied to a pointer value. Therefore,
expression -> identifier
is equivalent to
(*expression) . identifier
when expression is a pointer value
Thanks a lot vlatko!
That sounds a little easier