推 stupid0319: structure是一種概念,不存在於哪個區塊......... 02/03 14:55
※ 編輯: peng0116 (111.251.238.1), 02/03/2016 15:06:57
→ peng0116: 概念!?怎麼可能不存在記憶體區塊內...那變數存哪了... 02/03 15:11
推 stupid0319: 全域變數應當是放在data,區域變數在執行時會放stack 02/03 15:20
推 tjhuang: 確實 struct 的宣告不存在記憶體內,只是指示 offset 02/03 15:22
→ stupid0319: 至於struct是程式設計師的定義,此定義不存在於記憶體 02/03 15:23
→ dorgonman: TEST在這裡是放在data區 02/03 15:23
→ tjhuang: 例如你的 TEST.array 就只是標示 shift 4 bytes 02/03 15:23
→ peng0116: 了解,所以是看宣告struct TEST test;在全域還是區域 02/03 15:29
推 odanaga: 清大資工所 02/03 18:22
→ Caesar08: 樓上啥意思? 02/03 18:26
推 cobrasgo: 還要看前面有沒static 02/03 18:43
推 LPH66: 原 PO 你應該誤解了宣告...你原文裡的宣告 TEST 是變數名 02/03 18:55
→ LPH66: 跟著 struct 這個關鍵字後面的才是這 struct 的名字 02/03 18:55
→ LPH66: 所以像這個宣告是一個無名 struct, 然後宣告 TEST 為此型態 02/03 18:56
→ odanaga: 今年清大資工所出了這樣的題目 02/03 21:23
→ tinlans: 今年?所以題目還沒放上網嗎? 02/04 03:35
→ odanaga: B.html 02/05 17:32