數據結構中a->data與a.data有什么區別
1 回答

夢里花落0921
TA貢獻1772條經驗 獲得超6個贊
a->data中的a必須是指針,a.data中的a不是指針。比如你建了個struct point{int a,int b};然后在程序里你聲明了一個變量,point p;那你就能用p.a使用p中的a,如果你聲明了point *q = &p;那你想用q中的a,只能用q->a引用
- 1 回答
- 0 關注
- 664 瀏覽
添加回答
舉報
0/150
提交
取消