Im curious if they have an official name or just 'dot' and 'arrow'? I try search this in cpluscplus and in Deitel, but didn't find anything
Asked
Active
Viewed 960 times
1
-
1"Partial" duplicate, which actualy answers the full question: http://stackoverflow.com/questions/1580757/what-is-the-official-name-of-cs-arrow-operator – AnT stands with Russia Mar 24 '16 at 17:25
-
In the index of the C Standard they are indexed as "dot operator" and "arrow operator." – James McNellis Mar 24 '16 at 17:27
-
Yeah... when actually speaking I call them "dot" and "point". "arrow", while fine in print, is too much of a mouthful for normal conversation:) – Martin James Mar 24 '16 at 17:33
-
1_@HanArantes_ You should note that c and c++ have each their own standards and _official_ documentation. – πάντα ῥεῖ Mar 24 '16 at 17:35
-
@JamesMcNellis: There are alternative names in the standard – too honest for this site Mar 24 '16 at 17:37
-
3There is no language C/C++. Each has its own naming conventions. Which one do you use? – too honest for this site Mar 24 '16 at 17:38
-
@πάνταῥεῖ i thought the name in both was the same, but in this case, lets the question still the same, even to know whats (if there's any..) the difference between then – Han Arantes Mar 24 '16 at 17:38
-
@HanArantes It appears to be the same (from comments and answers) in this particular case, but that won't work in general for C and C++ language semantics or terminology questions. – πάντα ῥεῖ Mar 24 '16 at 17:44
-
@HanArantes That's not how this works. “Give me an overview over the names in more than one language” is too broad for this format. Ask about one language at a time. – fuz Mar 24 '16 at 17:56
-
@HanArantes : The objection to the term "C/C++" is a reflexive action amongst some, it is legitimate when referring to a product such as "*Microsoft C/C++*" (a name briefly used for v7 of Microsoft's compiler before "Visual C++") or "*C/C++ Users Journal*" (a now sadly defunct print magazine), but if you are referring to the languages C and C++, it is best to separate them (as I have done in the edit) to avoid the flaming. Sometimes it is legitimate to ask a question covering both languages, but best to be careful to avoid distracting comment noise (apologies Olaf).. – Clifford Mar 24 '16 at 18:00
-
@FUZxxl : Really? While C and C++ are somewhat diverging in standardisation, they share a common root, common library subset, direct interoperability, and more often that not are implemented in the same toolchain. It is often legitimate to ask a question referring to both languages. The "crime" (and a minor one, that some get far too exercised about IMO), is in referring to them as a single language. – Clifford Mar 24 '16 at 18:05
-
@Clifford I'm slightly sick of discussing this topic. Point is, to answer a “both C and C++” question, you have to be an expert in both and let's face it, too few people are that. Asking an overly broad questions (like one about both C and C++) attracts poor answers or answers that do not really answer the question. That's why Stack Overflow closes questions as “too broad” in the first place. – fuz Mar 24 '16 at 18:32
-
I'm voting to close this question as off-topic because it really should be seeking the answer in one language. – chux - Reinstate Monica Mar 24 '16 at 19:01
-
@FUZxxl : I take your point, but would rather take each question on its merit that apply a blanket policy. Sometimes a question is just not so objectionable as to be worth punitive closure, which is how some SO users seem to apply it. I say let it lie, and its "quality" will be duly reflected in its voting. All that said, I am not sure that the question serves much of a useful purpose to the community - I'm certainly not up-voting it. – Clifford Mar 24 '16 at 22:30
2 Answers
2
The C standard calls them member access operators, but only in the index. They aren't given a name anywhere else except the one place in the index. In the same place, the ->
operator is called arrow operator, the .
operator is called structure/union member operator.

fuz
- 88,405
- 25
- 200
- 352
-
The index uses the term "arrow operator" more often. And the `.` is the _structure/union member operator_. – too honest for this site Mar 24 '16 at 17:34
-
@Olaf I haven't found that one in the standard on the first search, but now I do, that's funny. – fuz Mar 24 '16 at 17:53
-
I also first found only the name `structure/union pointer operator`, but that is not very descriptive and very unintuitively. Personally, I prefer "arrow" and "dot" "operator" when talking, just because it's a bit complicated to speak in symbols. – too honest for this site Mar 24 '16 at 17:59
1
According to my preferred (C++) reference they are called Member Access operators.
But to distinguish one from the other these are usually called dot and arrow operator (see the link @AnT mentioned in their comment).
-
-
I think he is asking for the names of the individual operators, not the name of the set to which they belong. – Martin Bonner supports Monica Mar 24 '16 at 17:28
-
The index of the C reference has index entries for "arrow operator (`->`)" and "dot operator (`.`)". It also has index entries for "`->` (structure/union pointer operator)" and "`.` (structure/union member operator)". So "arrow operator" and "structure/union pointer operator" are synonymous, as are "dot operator" and "structure/union member operator". – Ian Abbott Mar 24 '16 at 17:39