c++中->与.的区别

->是指针类型,是指针引用ui .是实例化对象,类中普通成员的引用this 例如指针 class student对象 {qt public:       string          string name[20];class }cli 第一种状况,采用指针访问 student *xy,则访问时须要写成 *xy.name="hhhhh";等价于xy->name="hhhhh";引用 第二种状况,
相关文章
相关标签/搜索