Reputation: 55499
I know more C++ than C. Does C use ->
for pointers, or is that only used in C++?
Upvotes: 3
Views: 3394
Reputation: 239041
The ->
operator is part of standard C.
(expression)->identifier
is equivalent to (*expression).identifier
- obviously, for this to be valid, expression
must have a type of pointer to structure or pointer to union.
Upvotes: 19