Operators in C and C++: Difference between revisions

Content deleted Content added
Member and pointer: Use auto width
Line 292:
| {{n/a}}
|-
| {{rh}} colspan="2" | Indirection <br>{{small|("object pointed to by ''a''")}}
| style="text-align:center;" | <code>'''*'''a</code> || {{yes}} || {{yes}}
| {{cpp|1=R& K::operator *();}}
| {{cpp|1=R& operator *(K a);}}
|-
| {{rh}} colspan="2" | Address-of <br>{{small|("address of ''a''")}}
| style="text-align:center;" | <code>'''&'''a</code> || {{yes}}<ref name="addressof2" group="lower-alpha"/> || {{yes}}
| {{cpp|1=R* K::operator &();}}
| {{cpp|1=R* operator &(K a);}}
|-
| {{rh}} colspan="2" | Structure dereference <br>{{small|("member ''b'' of object pointed to by ''a''")}}
| style="text-align:center;" | <code>a'''->'''b</code> || {{yes}} || {{yes}}
| {{cpp|1=R* K::operator ->();}}<ref name="arrowptr" group="lower-alpha" /><br />
| {{n/a}}
|-
| {{rh}} colspan="2" | Structure reference <br>{{small|("member ''b'' of object ''a''")}}
| style="text-align:center;" | <code>a'''.'''b</code> || {{no}} || {{yes}}
| {{rh}} colspan="2" {{n/a}}