名稱空間
變體
操作

標準庫標頭檔案 <climits>

來自 cppreference.com
 
 
標準庫標頭檔案
演算法
<algorithm>
<numeric>
字串
<cctype>
<cstring>
<cuchar> (C++11)
<cwchar>
<cwctype>
<string_view> (C++17)
<string>
文字處理
<clocale>
<codecvt> (C++11/17/26*)
<locale>
<regex> (C++11)
<text_encoding> (C++26)   
數值
<cfenv> (C++11)
<cmath>
<complex>
<linalg> (C++26)
<numbers> (C++20)
<random> (C++11)
<simd> (C++26)
<valarray>
時間
<chrono> (C++11)
<ctime>
C 相容性
<ccomplex> (C++11/17/20*)
<ciso646> (直到 C++20)
<cstdalign> (C++11/17/20*)
<cstdbool> (C++11/17/20*)
<ctgmath> (C++11/17/20*)
 

此標頭檔案最初是 C 標準庫的一部分,名為 <limits.h>

此標頭檔案是型別支援庫的一部分,特別是它是C 數值限制介面的一部分。

[編輯]

CHAR_BIT
位元組的位寬度
(宏常量) [編輯]
MB_LEN_MAX
多位元組字元中的最大位元組數
(宏常量) [編輯]
CHAR_MIN
char 的最小值
(宏常量) [編輯]
CHAR_MAX
char 的最大值
(宏常量) [編輯]
SCHAR_MINSHRT_MININT_MINLONG_MINLLONG_MIN
(C++11)
分別為 signed charshortintlonglong long 的最小值
(宏常量) [編輯]
SCHAR_MAXSHRT_MAXINT_MAXLONG_MAXLLONG_MAX
(C++11)
分別為 signed charshortintlonglong long 的最大值
(宏常量) [編輯]
UCHAR_MAXUSHRT_MAXUINT_MAXULONG_MAXULLONG_MAX
(C++11)
分別為 unsigned charunsigned shortunsigned int
unsigned longunsigned long long 的最大值
(宏常量) [編輯]

[編輯] 概要

#define CHAR_BIT      /* see definition */
#define SCHAR_MIN     /* see definition */
#define SCHAR_MAX     /* see definition */
#define UCHAR_MAX     /* see definition */
#define CHAR_MIN      /* see definition */
#define CHAR_MAX      /* see definition */
#define MB_LEN_MAX    /* see definition */
#define SHRT_MIN      /* see definition */
#define SHRT_MAX      /* see definition */
#define USHRT_MAX     /* see definition */
#define INT_MIN       /* see definition */
#define INT_MAX       /* see definition */
#define UINT_MAX      /* see definition */
#define LONG_MIN      /* see definition */
#define LONG_MAX      /* see definition */
#define ULONG_MAX     /* see definition */
#define LLONG_MIN     /* see definition */
#define LLONG_MAX     /* see definition */
#define ULLONG_MAX    /* see definition */