c++中->與.的區別

->是指針類型,是指針引用ui .是實例化對象,類中普通成員的引用this 例如指針 class student對象 {qt public:       string          string name[20];class }cli 第一種狀況,採用指針訪問 student *xy,則訪問時須要寫成 *xy.name="hhhhh";等價於xy->name="hhhhh";引用 第二種狀況,
相關文章
相關標籤/搜索