Re: [問題] 關於Class指標的觀念

看板C_and_CPP (C/C++)作者 (陪在妳身邊 :))時間11年前 (2013/08/27 23:23), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/19 (看更多)

08/27 23:00,
那就換您說說看您的觀點如何?
08/27 23:00

08/27 23:05,
哪個觀點? 我都說了指標不等同無號正整數大概有數十次~
08/27 23:05

08/27 23:08,
然後我發現你對"無號正整數"有些跟我不一樣的認知
08/27 23:08

08/27 23:08,
所以我才跟你討論這個~
08/27 23:08

08/27 23:16,
那請問「指標不等同無號正整數」的觀點為何?
08/27 23:16
各位看官請慢慢看... 不過 C++ 小弟就不知道惹,沒翻過 Cpp standard (逃 N1570 Committee Draft — April 12, 2011 ISO/IEC 9899:201xOB 6.3.2.3 Pointers 5. An integer may be converted to any pointer type. Except as previously specified, the result is implementation-defined, might not be correctly aligned, might not point to an entity of the referenced type, and might be a trap representation.(67) 6. Any pointer type may be converted to an integer type. Except as previously specified, the result is implementation-defined. If the result cannot be represented in the integer type, the behavior is undefined. The result need not be in the range of values of any integer type. (67) The mapping functions for converting a pointer to an integer or an integer to a pointer are intended to be consistent with the addressing structure of the execution environment. 6.5.4 Cast operators 4. A pointer type shall not be converted to any floating type. A floating type shall not be converted to any pointer type. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 72.36.94.170
文章代碼(AID): #1I7CHeKK (C_and_CPP)
討論串 (同標題文章)
文章代碼(AID): #1I7CHeKK (C_and_CPP)