Ray's playground

 

Types and Declarations(Chapter 4 of The C++ Programming Language)

  1 = sizeof(char) <= sizeof(short) <= sizeof(int) <= sizeof(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)

  where N can be char, short int , int , or long int. In addition, it is guaranteed that a char has at least 8 bits, a short at least 16 bits, and a long at least 32 bits. A char can hold a character of the machine’s character set. 

posted on 2010-07-20 22:15  Ray Z  阅读(173)  评论(0编辑  收藏  举报

导航