c++ 中的 -> :: : .

1、A.B 则 A 为对象或者结构体
2、A->B 则A 为指针,-> 是成员提取,A->B 是提取 A 中的成员 B,A 只能是指向类、结构、联合的指针

class student
{
public:       
string name[20];
}
student *xy;//访问时需要写成 *xy.name="hhhhh";等价于 xy->name="hhhhh"。
 student xy;//访问时需要写成 xy.name="hhhhh"

3、:: 是作用域运算符,A::B 表示作用域 A 中的名称 B,A 可以是名字空间、类、结构;
4、:一般用来表示继承;

A 为指向结构体指针

原文地址:https://www.cnblogs.com/xinping-study/p/11909673.html