可能显示的文件:
C++: ptr->hello(); /* VERSUS */ (*ptr).hello();
Why does C have a distinction between -> and . ?- >和>之间的区别是什么。在C/C++?
我知道由指针操作者的构件操作者和构件之间的差值( - >)(。)。
为什么C设计人员为此访问创建了不同的运算符?为什么编译器不能自行解决?
如果你总是使用a。是否有任何情况存在于您指的是会员还是会员的含义模糊的情况下?
编辑:我不是在寻找“(* a).b”语法。我问为什么设计师不让你使用“a.b”而不是“a-> b”?
该符号最初来自C. – 2010-05-29 23:53:21
好点:我改变了问题使用C而不是C++。 – 2010-05-29 23:56:24
[C++:ptr-> hello();/* VERSUS * /(* ptr).hello();](http://stackoverflow.com/questions/447543/c-ptr-hello-versus-ptr-hello)和[有什么区别(。)点运算符和( - >)箭头在c + +](http://stackoverflow.com/questions/1238613/what-is-the-difference-between-dot-operator-and-arrow-in-c) – 2010-05-30 00:05:38