##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# Member access operators

From cppreference.com
< c‎ | language

Member access operators allow access to the members of their operands.

Operator | Operator name | Example | Description
--- | --- | --- | ---
[] | array subscript | a[b] | access the bth element of array a
* | pointer dereference | *a | dereference the pointer a to access the data it points to
& | address of | &a | the address of a
. | struct member | a.b | access member b of struct a
-> | struct member of pointer to struct | a->b | access member b of struct pointed to by a equivalent of first dereferencing the pointer to the struct a then accessing member b: (*a).b

### [edit] See Also

- Operator precedence
- Arrays
- Pointers
- Keyword: struct

Common operators
assignment | increment decrement | arithmetic | logical | comparison | member access | other
a = b a += b a -= b a *= b a /= b a %= b a &= b a |= b a ^= b a <<= b a >>= b | ++a --a a++ a-- | +a -a a + b a - b a * b a / b a % b ~a a & b a | b a ^ b a << b a >> b | !a a && b a || b | a == b a != b a < b a > b a <= b a >= b | a[b] *a &a a->b a.b | a(...) a, b (type) a ? : sizeof _Alignof (since C11)

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/language/operator_member_access&oldid=41448"