Re: [問題] 關於Class指標的觀念
→
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
討論串 (同標題文章)
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章