C++ 中可确定的内置类型的大小关系

  1 ≡ sizeof(char) ≤ sizeof(short) ≤ sizeof(int) ≤ sizeof(long) ≤ sizeof(long long)

• 1 ≤ sizeof(bool) ≤ sizeof(long)

• sizeof(char) ≤ sizeof(wchar_t) ≤ sizeof(long)

• sizeof(float) ≤ sizeof(double) ≤ sizeof(long double)

• sizeof(N) ≡ sizeof(signed N) ≡ sizeof(unsigned N)


C 中:


posted @ 2014-11-11 18:41  wu_overflow  阅读(192)  评论(0编辑  收藏  举报