作者查詢 / ss1h2a3tw

總覽項目: 發文 | 留言 | 暱稱
作者 ss1h2a3tw 在 PTT [ C_and_CPP ] 看板的留言(推文), 共7則
限定看板:C_and_CPP
首頁
上一頁
1
下一頁
尾頁
[問題] 雙向鏈結串列
[ C_and_CPP ]28 留言, 推噓總分: +9
作者: wei115 - 發表於 2018/04/02 00:11(7年前)
6Fss1h2a3tw: 因為指到struct的指標在存取member的時候是用指標內容+04/02 02:55
7Fss1h2a3tw: member offset, 所以你用什麼型態的指標它就會用那個定04/02 02:56
8Fss1h2a3tw: 義內的member的offset存取,還有list_head不是這樣用的04/02 02:57
9Fss1h2a3tw: 去看看container_of這個macro吧,我建議你先弄懂C的運作04/02 02:58
10Fss1h2a3tw: 再去看linux kernel,因為裡面有各式各樣的神奇技巧04/02 02:59
11Fss1h2a3tw: 例如這個 https://goo.gl/Ejcs4704/02 03:02
12Fss1h2a3tw: 為什麼定義一個 struct upid numbers[1]; 這樣的東西04/02 03:03
首頁
上一頁
1
下一頁
尾頁