2010年4月19日 星期一

A程式寫擋然後B程式讀檔常見的問題

1.由A程式將結構寫到檔案中
2.用B程式讀檔案分析
出現檔案讀出的資料成員不完全正確之問題

請確認兩支程式的 struct member alignment是不是設成一樣的BYTES數
這個選項在 "Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation -> Struct Member Alignment"

1 byte
2bytes
4bytes
8bytes
16bytes


進一步參考文

沒有留言:

張貼留言