討論串[問題] 關於c語言指標的問題
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓4(4推 0噓 13→)留言17則,0人參與, 最新作者stator (別急著吃棉花糖)時間14年前 (2010/05/30 09:56), 編輯資訊
1
0
0
內容預覽:
各位c語言前輩好. 小弟在寫考古題時遇到幾題問題,希望能請各位前輩指教. struct student{. char *last_name. int student_id. char grade;. };. struct student tmp, *p=&tmp;. tmp.grade='A';.
(還有569個字)

推噓0(0推 0噓 7→)留言7則,0人參與, 最新作者guam (小兄弟阿哲)時間14年前 (2010/05/30 13:46), 編輯資訊
1
0
1
內容預覽:
http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B. "->" 的優先度高於"*". 所以 *p->last_name 和 *(p->last_name) 是一樣的. 而"*" 比"+"(addition )的優先度高 所以會先做* (已修
(還有123個字)

推噓1(1推 0噓 4→)留言5則,0人參與, 最新作者smallpig01 (http://0rz.tw/3BGhp)時間14年前 (2010/06/03 13:56), 編輯資訊
0
0
1
內容預覽:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^. 如果這是對的. ^^^^^^^^^^^^^^^^. (p->last_name+2) == ((p->last_name)+2) 結果應該是這樣,不是嗎. == ((last_name[0])+2) 以舉陣來表示的話會是這樣吧
(還有1個字)
首頁
上一頁
1
下一頁
尾頁