請問有沒有compiler option 可以用來忽略sign ?

看板Programming作者時間18年前 (2006/06/19 14:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/4 (看更多)
請教各位, 在VC++裡, 以下程式的第 5 行並不會成立, 原因是 ch 已經被轉為負值, 但在某些老舊的compiler裡, 第5行會成立 因為它直接做記憶體內容比對. 請問VC++裡有沒有compiler option可以忽略 sign ? 感謝 1 void main() { 2 char ch, x=0; 3 4 ch=0x81; 5 if(ch == 0x81) x=1; 6 } -- * Origin: ★ 交通大學資訊科學系 BBS ★ <bbs.cis.nctu.edu.tw: 140.113.23.3>
文章代碼(AID): #14bZsV00 (Programming)
討論串 (同標題文章)
文章代碼(AID): #14bZsV00 (Programming)