zoukankan      html  css  js  c++  java
  • C++

    内置类型的最大值宏定义


    本文地址: http://blog.csdn.net/caroline_wendy/article/details/24311895


    C++中, 常常会使用, 某些类型的最大值, 如int的最大整数(INT_MAX), C的函数中, 包括了这些宏定义.

    头文件: #include <climits>

    详细參见:

    name expresses value*
    CHAR_BIT Number of bits in a char object (byte) 8 or greater*
    SCHAR_MIN Minimum value for an object of type signed char -127 (-27+1) or less*
    SCHAR_MAX Maximum value for an object of type signed char 127 (27-1) or greater*
    UCHAR_MAX Maximum value for an object of type unsigned char 255 (28-1) or greater*
    CHAR_MIN Minimum value for an object of type char either SCHAR_MIN or 0
    CHAR_MAX Maximum value for an object of type char either SCHAR_MAX or UCHAR_MAX
    MB_LEN_MAX Maximum number of bytes in a multibyte character, for any locale 1 or greater*
    SHRT_MIN Minimum value for an object of type short int -32767 (-215+1) or less*
    SHRT_MAX Maximum value for an object of type short int 32767 (215-1) or greater*
    USHRT_MAX Maximum value for an object of type unsigned short int 65535 (216-1) or greater*
    INT_MIN Minimum value for an object of type int -32767 (-215+1) or less*
    INT_MAX Maximum value for an object of type int 32767 (215-1) or greater*
    UINT_MAX Maximum value for an object of type unsigned int 65535 (216-1) or greater*
    LONG_MIN Minimum value for an object of type long int -2147483647 (-231+1) or less*
    LONG_MAX Maximum value for an object of type long int 2147483647 (231-1) or greater*
    ULONG_MAX Maximum value for an object of type unsigned long int 4294967295 (232-1) or greater*
    LLONG_MIN Minimum value for an object of type long long int -9223372036854775807 (-263+1) or less*
    LLONG_MAX Maximum value for an object of type long long int 9223372036854775807 (263-1) or greater*
    ULLONG_MAX Maximum value for an object of type unsigned long long int 18446744073709551615 (264-1) or greater*




  • 相关阅读:
    使用TFS CI 又想保留服务运行状态的简单方法
    【知乎】二战中日本陆军的建制
    缓存你的BITMAP对象
    Android 多种方式正确的加载图像,有效避免oom
    GitHub进一步了解
    响应式编程,是明智的选择
    Android 主题动态切换框架:Prism
    Android Fragment使用(二) 嵌套Fragments (Nested Fragments) 的使用及常见错误
    ClassLoader工作机制
    Java——泛型(最易懂的方式讲解泛型)
  • 原文地址:https://www.cnblogs.com/mfrbuaa/p/4009612.html
Copyright © 2011-2022 走看看