What is "->" called...

F

FC

Hi all:
I would like to find out more about the "->" symbol and I think the name
of it will be a good starting place. Also I would like to know what are
the differences between "->" and "*". Thank you very much.

FC
 
P

Pete Becker

FC said:
I would like to find out more about the "->" symbol and I think the name
of it will be a good starting place.

It's often called "arrow", sometimes "points at".
Also I would like to know what are
the differences between "->" and "*". Thank you very much.

a->b is equivalent to (*a).b.
 
V

Victor Bazarov

FC said:
I would like to find out more about the "->" symbol and I think the
name of it will be a good starting place. Also I would like to know
what are the differences between "->" and "*". Thank you very much.

-> is called "member access operator for pointers".
* is a dereference operator.

V
 
B

ben

a->b is equivalent to (*a).b.

If a is an object (not pointer) then it means (a.operator->())->b, or
(*(a.operator->())).b

ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,666
Latest member
selsetu

Latest Threads

Top