开发者

Pointer notation in C

开发者 https://www.devze.com 2022-12-11 10:21 出处:网络
I know more C++ than C.D开发者_开发知识库oes C use -> for pointers, or is that only used in C++?The -> operator is part of standard C.

I know more C++ than C. D开发者_开发知识库oes C use -> for pointers, or is that only used in C++?


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.


It is used in both languages.

0

精彩评论

暂无评论...
验证码 换一张
取 消