Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the official name of C++'s arrow (->) operator?

I always call it the "arrow operator", but I'm sure it has an official name. I quickly skimmed the C++ standard and didn't see it mentioned by name.

like image 945
rmeador Avatar asked Oct 16 '09 22:10

rmeador


People also ask

What is the -> called in C++?

The -> is called the arrow operator. It is formed by using the minus sign followed by a greater than sign. Simply saying: To access members of a structure, use the dot operator. To access members of a structure through a pointer, use the arrow operator.

What is the meaning of -> in PHP?

The object operator, -> , is used in object scope to access methods and properties of an object. It's meaning is to say that what is on the right of the operator is a member of the object instantiated into the variable on the left side of the operator.

What is the difference between dot operator and arrow operator in C?

Difference between Dot and Arrow Operators in C. Question: What is Difference in Accessing Structure Members Using Dot '. ' and Arrow Operator '->' in C Language? No difference in the result!


1 Answers

The C++ standard just calls it "arrow" (§5.2.5).

like image 125
Jerry Coffin Avatar answered Oct 10 '22 10:10

Jerry Coffin