Namespaces
Variants

Standard library header <cinttypes> (C++11)

From cppreference.net
Standard library headers

该头文件最初作为 <inttypes.h> 存在于C标准库中。

目录

包含文件

(C++11)
固定宽度整数类型 其他类型的限制

类型

(C++11)
结构体类型,由 std::imaxdiv 返回
(类型定义)

函数

计算整数值的绝对值 ( |x| )
(函数)
计算整数除法的商和余数
(函数)
(C++11) (C++11)
将字节字符串转换为 std::intmax_t std::uintmax_t
(函数)
(C++11) (C++11)
将宽字符串转换为 std::intmax_t std::uintmax_t
(函数)

std::fprintf 系列函数的格式常量
PRId8 PRId16 PRId32 PRId64 PRIdLEAST8 PRIdLEAST16 PRIdLEAST32 PRIdLEAST64 PRIdFAST8 PRIdFAST16 PRIdFAST32 PRIdFAST64 PRIdMAX PRIdPTR
(C++11)
用于输出类型为 std::int8_t std::int16_t std::int32_t std::int64_t std::int_least8_t std::int_least16_t std::int_least32_t std::int_least64_t std::int_fast8_t std::int_fast16_t std::int_fast32_t std::int_fast64_t std::intmax_t std::intptr_t 的有符号十进制整数值的格式转换说明符,分别等价于 d (对于 int
(宏常量)
PRIi8 PRIi16 PRIi32 PRIi64 PRIiLEAST8 PRIiLEAST16 PRIiLEAST32 PRIiLEAST64 PRIiFAST8 PRIiFAST16 PRIiFAST32 PRIiFAST64 PRIiMAX PRIiPTR
(C++11)
用于输出类型为 std::int8_t std::int16_t std::int32_t std::int64_t std::int_least8_t std::int_least16_t std::int_least32_t std::int_least64_t std::int_fast8_t std::int_fast16_t std::int_fast32_t std::int_fast64_t std::intmax_t std::intptr_t 的有符号十进制整数值的格式转换说明符,分别等价于 i (对于 int
(宏常量)
PRIu8 PRIu16 PRIu32 PRIu64 PRIuLEAST8 PRIuLEAST16 PRIuLEAST32 PRIuLEAST64 PRIuFAST8 PRIuFAST16 PRIuFAST32 PRIuFAST64 PRIuMAX PRIuPTR
<span class

概要

#include <cstdint>
namespace std
{
    using imaxdiv_t = /* 见描述 */;
    constexpr intmax_t imaxabs(intmax_t j);
    constexpr imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
    intmax_t strtoimax(const char* nptr, char** endptr, int base);
    uintmax_t strtoumax(const char* nptr, char** endptr, int base);
    intmax_t wcstoimax(const wchar_t* nptr, wchar_t** endptr, int base);
    uintmax_t wcstoumax(const wchar_t* nptr, wchar_t** endptr, int base);
    constexpr intmax_t abs(intmax_t);            // 可选,见描述
    constexpr imaxdiv_t div(intmax_t, intmax_t); // 可选,见描述
}
#define PRIdN /* 见描述 */
#define PRIiN /* 见描述 */
#define PRIoN /* 见描述 */
#define PRIuN /* 见描述 */
#define PRIxN /* 见描述 */
#define PRIXN /* 见描述 */
#define SCNdN /* 见描述 */
#define SCNiN /* 见描述 */
#define SCNoN /* 见描述 */
#define SCNuN /* 见描述 */
#define SCNxN /* 见描述 */
#define PRIdLEASTN /* 见描述 */
#define PRIiLEASTN /* 见描述 */
#define PRIoLEASTN /* 见描述 */
#define PRIuLEASTN /* 见描述 */
#define PRIxLEASTN /* 见描述 */
#define PRIXLEASTN /* 见描述 */
#define SCNdLEASTN /* 见描述 */
#define SCNiLEASTN /* 见描述 */
#define SCNoLEASTN /* 见描述 */
#define SCNuLEASTN /* 见描述 */
#define SCNxLEASTN /* 见描述 */
#define PRIdFASTN /* 见描述 */
#define PRIiFASTN /* 见描述 */
#define PRIoFASTN /* 见描述 */
#define PRIuFASTN /* 见描述 */
#define PRIxFASTN /* 见描述 */
#define PRIXFASTN /* 见描述 */
#define SCNdFASTN /* 见描述 */
#define SCNiFASTN /* 见描述 */
#define SCNoFASTN /* 见描述 */
#define SCNuFASTN /* 见描述 */
#define SCNxFASTN /* 见描述 */
#define PRIdMAX /* 见描述 */
#define PRIiMAX /* 见描述 */
#define PRIoMAX /* 见描述 */
#define PRIuMAX /* 见描述 */
#define PRIxMAX /* 见描述 */
#define PRIXMAX /* 见描述 */
#define SCNdMAX /* 见描述 */
#define SCNiMAX /* 见描述 */
#define SCNoMAX /* 见描述 */
#define SCNuMAX /* 见描述 */
#define SCNxMAX /* 见描述 */
#define PRIdPTR /* 见描述 */
#define PRIiPTR /* 见描述 */
#define PRIoPTR /* 见描述 */
#define PRIuPTR /* 见描述 */
#define PRIxPTR /* 见描述 */
#define PRIXPTR /* 见描述 */
#define SCNdPTR /* 见描述 */
#define SCNiPTR /* 见描述 */
#define SCNoPTR /* 见描述 */
#define SCNuPTR /* 见描述 */
#define SCNxPTR /* 见描述 */