Standard library header <cinttypes> (C++11)
From cppreference.net
Este encabezado estaba originalmente en la biblioteca estándar de C como <inttypes.h> .
Incluye |
||
|
(C++11)
|
Tipos de enteros de ancho fijo y límites de otros tipos | |
Tipos |
||
|
(C++11)
|
tipo de estructura, devuelto por
std::imaxdiv
(typedef) |
|
Funciones |
||
|
(C++11)
(C++11)
|
calcula el valor absoluto de un valor integral (
|x|
)
(función) |
|
|
(C++11)
(C++11)
|
calcula el cociente y el resto de una división entera
(función) |
|
|
(C++11)
(C++11)
|
convierte una cadena de bytes a
std::intmax_t
o
std::uintmax_t
(función) |
|
|
(C++11)
(C++11)
|
convierte una cadena ancha a
std::intmax_t
o
std::uintmax_t
(función) |
|
Macros |
||
Constantes de formato para la std::fprintf familia de funciones |
||
|
PRId8
PRId16
PRId32
PRId64
PRIdLEAST8
PRIdLEAST16
PRIdLEAST32
PRIdLEAST64
PRIdFAST8
PRIdFAST16
PRIdFAST32
PRIdFAST64
PRIdMAX
PRIdPTR
(C++11)
|
especificador de conversión de formato para mostrar un valor entero decimal con signo de tipo
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
respectivamente, equivalente a
d
para
int
(constante macro) |
|
|
PRIi8
PRIi16
PRIi32
PRIi64
PRIiLEAST8
PRIiLEAST16
PRIiLEAST32
PRIiLEAST64
PRIiFAST8
PRIiFAST16
PRIiFAST32
PRIiFAST64
PRIiMAX
PRIiPTR
(C++11)
|
especificador de conversión de formato para mostrar un valor entero decimal con signo de tipo
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
respectivamente, equivalente a
i
para
int
(constante macro) |
|
|
PRIu8
PRIu16
PRIu32
PRIu64
PRIuLEAST8
PRIuLEAST16
PRIuLEAST32
PRIuLEAST64
PRIuFAST8
PRIuFAST16
PRIuFAST32
PRIuFAST64
PRIuMAX
PRIuPTR
(C++11)
|
especificador de conversión de formato para mostrar un valor entero decimal sin signo de tipo
std::uint8_t
,
std::uint16_t
,
std::uint32_t
,
std::uint64_t
,
std::uint_least8_t
,
std::uint_least16_t
,
std::uint_least32_t
,
std::uint_least64_t
,
std::uint_fast8_t
,
std::uint_fast16_t
,
std::uint_fast32_t
,
std::uint_fast64_t
,
std::uintmax_t
,
std::uintptr_t
respectivamente, equivalente a
u
para
unsigned
int
(constante macro) |
|
|
PRIo8
PRIo16
PRIo32
PRIo64
PRIoLEAST8
PRIoLEAST16
PRIoLEAST32
PRIoLEAST64
PRIoFAST8
PRIoFAST16
PRIoFAST32
PRIoFAST64
PRIoMAX
PRIoPTR
(C++11)
|
especificador de conversión de formato para mostrar un valor entero octal sin signo de tipo
std::uint8_t
,
std::uint16_t
,
std::uint32_t
,
std::uint64_t
,
std::uint_least8_t
,
std::uint_least16_t
,
std::uint_least32_t
,
std::uint_least64_t
,
std::uint_fast8_t
,
std::uint_fast16_t
,
std::uint_fast32_t
,
std::uint_fast64_t
,
std::uintmax_t
,
std::uintptr_t
respectivamente, equivalente a
o
para
unsigned
int
(constante macro) |
|
|
PRIx8
PRIx16
PRIx32
PRIx64
PRIxLEAST8
PRIxLEAST16
PRIxLEAST32
PRIxLEAST64
PRIxFAST8
PRIxFAST16
PRIxFAST32
PRIxFAST64
PRIxMAX
PRIxPTR
(C++11)
|
especificador de conversión de formato para mostrar un valor entero hexadecimal en minúsculas sin signo de tipo
std::uint8_t
,
std::uint16_t
,
std::uint32_t
,
std::uint64_t
,
std::uint_least8_t
,
std::uint_least16_t
,
std::uint_least32_t
,
std::uint_least64_t
,
std::uint_fast8_t
,
std::uint_fast16_t
,
std::uint_fast32_t
,
std::uint_fast64_t
,
std::uintmax_t
,
std::uintptr_t
respectivamente, equivalente a
x
para
unsigned
int
(constante macro) |
|
|
PRIX8
PRIX16
PRIX32
PRIX64
PRIXLEAST8
PRIXLEAST16
PRIXLEAST32
PRIXLEAST64
PRIXFAST8
PRIXFAST16
PRIXFAST32
PRIXFAST64
PRIXMAX
PRIXPTR
(C++11)
|
especificador de conversión de formato para mostrar un valor entero hexadecimal en mayúsculas sin signo de tipo
std::uint8_t
,
std::uint16_t
,
std::uint32_t
,
std::uint64_t
,
std::uint_least8_t
,
std::uint_least16_t
,
std::uint_least32_t
,
std::uint_least64_t
,
std::uint_fast8_t
,
std::uint_fast16_t
,
std::uint_fast32_t
,
std::uint_fast64_t
,
std::uintmax_t
,
std::uintptr_t
respectivamente, equivalente a
X
para
unsigned
int
(constante macro) |
|
Constantes de formato para la familia de funciones std::fscanf |
||
|
SCNd8
SCNd16
SCNd32
SCNd64
SCNdLEAST8
SCNdLEAST16
SCNdLEAST32
SCNdLEAST64
SCNdFAST8
SCNdFAST16
SCNdFAST32
SCNdFAST64
SCNdMAX
SCNdPTR
(C++11)
|
especificador de conversión de formato para introducir un valor entero decimal con signo de tipo
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
respectivamente, equivalente a
d
para
int
(constante macro) |
|
|
SCNi8
SCNi16
SCNi32
SCNi64
SCNiLEAST8
SCNiLEAST16
SCNiLEAST32
SCNiLEAST64
SCNiFAST8
SCNiFAST16
SCNiFAST32
SCNiFAST64
SCNiMAX
SCNiPTR
(C++11)
|
especificador de formato de conversión para introducir un valor entero decimal/octal/hexadecimal con signo de tipo
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
respectivamente, equivalente a
i
para
int
(constante macro) |
|
|
SCNu8
SCNu16
SCNu32
SCNu64
SCNuLEAST8
SCNuLEAST16
SCNuLEAST32
SCNuLEAST64
SCNuFAST8
SCNuFAST16
SCNuFAST32
SCNuFAST64
SCNuMAX
SCNuPTR
(C++11)
|
especificador de conversión de formato para introducir un valor entero decimal sin signo de tipo
std::uint8_t
,
std::uint16_t
,
std::uint32_t
,
std::uint64_t
,
std::uint_least8_t
,
std::uint_least16_t
,
std::uint_least32_t
,
std::uint_least64_t
,
std::uint_fast8_t
,
std::uint_fast16_t
,
std::uint_fast32_t
,
std::uint_fast64_t
,
std::uintmax_t
,
std::uintptr_t
respectivamente, equivalente a
u
para
unsigned
int
(constante macro) |
|
|
SCNo8
SCNo16
SCNo32
SCNo64
SCNoLEAST8
SCNoLEAST16
SCNoLEAST32
SCNoLEAST64
SCNoFAST8
SCNoFAST16
SCNoFAST32
SCNoFAST64
SCNoMAX
SCNoPTR
(C++11)
|
especificador de conversión de formato para introducir un valor entero octal sin signo de tipo
std::uint8_t
,
std::uint16_t
,
std::uint32_t
,
std::uint64_t
,
std::uint_least8_t
,
std::uint_least16_t
,
std::uint_least32_t
,
std::uint_least64_t
,
std::uint_fast8_t
,
std::uint_fast16_t
,
std::uint_fast32_t
,
std::uint_fast64_t
,
std::uintmax_t
,
std::uintptr_t
respectivamente, equivalente a
o
para
unsigned
int
(constante macro) |
|
|
SCNx8
SCNx16
SCNx32
SCNx64
SCNxLEAST8
SCNxLEAST16
SCNxLEAST32
SCNxLEAST64
SCNxFAST8
SCNxFAST16
SCNxFAST32
SCNxFAST64
SCNxMAX
SCNxPTR
(C++11)
|
especificador de conversión de formato para introducir un valor entero hexadecimal sin signo de tipo
std::uint8_t
,
std::uint16_t
,
std::uint32_t
,
std::uint64_t
,
std::uint_least8_t
,
std::uint_least16_t
,
std::uint_least32_t
,
std::uint_least64_t
,
std::uint_fast8_t
,
std::uint_fast16_t
,
std::uint_fast32_t
,
std::uint_fast64_t
,
std::uintmax_t
,
std::uintptr_t
respectivamente, equivalente a
x
para
unsigned
int
(constante macro) |
|
Sinopsis
#include <cstdint> namespace std { using imaxdiv_t = /* ver descripción */; 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); // opcional, ver descripción constexpr imaxdiv_t div(intmax_t, intmax_t); // opcional, ver descripción } #define PRIdN /* ver descripción */ #define PRIiN /* ver descripción */ #define PRIoN /* ver descripción */ #define PRIuN /* ver descripción */ #define PRIxN /* ver descripción */ #define PRIXN /* ver descripción */ #define SCNdN /* ver descripción */ #define SCNiN /* ver descripción */ #define SCNoN /* ver descripción */ #define SCNuN /* ver descripción */ #define SCNxN /* ver descripción */ #define PRIdLEASTN /* ver descripción */ #define PRIiLEASTN /* ver descripción */ #define PRIoLEASTN /* ver descripción */ #define PRIuLEASTN /* ver descripción */ #define PRIxLEASTN /* ver descripción */ #define PRIXLEASTN /* ver descripción */ #define SCNdLEASTN /* ver descripción */ #define SCNiLEASTN /* ver descripción */ #define SCNoLEASTN /* ver descripción */ #define SCNuLEASTN /* ver descripción */ #define SCNxLEASTN /* ver descripción */ #define PRIdFASTN /* ver descripción */ #define PRIiFASTN /* ver descripción */ #define PRIoFASTN /* ver descripción */ #define PRIuFASTN /* ver descripción */ #define PRIxFASTN /* ver descripción */ #define PRIXFASTN /* ver descripción */ #define SCNdFASTN /* ver descripción */ #define SCNiFASTN /* ver descripción */ #define SCNoFASTN /* ver descripción */ #define SCNuFASTN /* ver descripción */ #define SCNxFASTN /* ver descripción */ #define PRIdMAX /* ver descripción */ #define PRIiMAX /* ver descripción */ #define PRIoMAX /* ver descripción */ #define PRIuMAX /* ver descripción */ #define PRIxMAX /* ver descripción */ #define PRIXMAX /* ver descripción */ #define SCNdMAX /* ver descripción */ #define SCNiMAX /* ver descripción */ #define SCNoMAX /* ver descripción */ #define SCNuMAX /* ver descripción */ #define SCNxMAX /* ver descripción */ #define PRIdPTR /* ver descripción */ #define PRIiPTR /* ver descripción */ #define PRIoPTR /* ver descripción */ #define PRIuPTR /* ver descripción */ #define PRIxPTR /* ver descripción */ #define PRIXPTR /* ver descripción */ #define SCNdPTR /* ver descripción */ #define SCNiPTR /* ver descripción */ #define SCNoPTR /* ver descripción */ #define SCNuPTR /* ver descripción */ #define SCNxPTR /* ver descripción */