Namespaces
Variants

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

From cppreference.net
Standard library headers

Cet en-tête était à l'origine dans la bibliothèque standard C sous le nom de <inttypes.h> .

Table des matières

Inclusions

(C++11)
Types entiers à largeur fixe et limites des autres types

Types

(C++11)
type de structure, retourné par std::imaxdiv
(typedef)

Fonctions

calcule la valeur absolue d'une valeur entière ( |x| )
(fonction)
calcule le quotient et le reste d'une division entière
(fonction)
(C++11) (C++11)
convertit une chaîne d'octets en std::intmax_t ou std::uintmax_t
(fonction)
(C++11) (C++11)
convertit une chaîne large en std::intmax_t ou std::uintmax_t
(fonction)

Macros

Constantes de format pour la famille de fonctions std::fprintf
PRId8 PRId16 PRId32 PRId64 PRIdLEAST8 PRIdLEAST16 PRIdLEAST32 PRIdLEAST64 PRIdFAST8 PRIdFAST16 PRIdFAST32 PRIdFAST64 PRIdMAX PRIdPTR
(C++11)
spécificateur de conversion de format pour afficher une valeur entière décimale signée de type 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 respectivement, équivalent à d pour int
(constante macro)
PRIi8 PRIi16 PRIi32 PRIi64 PRIiLEAST8 PRIiLEAST16 PRIiLEAST32 PRIiLEAST64 PRIiFAST8 PRIiFAST16 PRIiFAST32 PRIiFAST64 PRIiMAX PRIiPTR
(C++11)
spécificateur de conversion de format pour afficher une valeur entière décimale signée de type 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 respectivement, équivalent à i pour int
(constante macro)
PRIu8 PRIu16 PRIu32 PRIu64 PRIuLEAST8 PRIuLEAST16 PRIuLEAST32 PRIuLEAST64 PRIuFAST8 PRIuFAST16 PRIuFAST32 PRIuFAST64 PRIuMAX PRIuPTR
(C++11)
spécificateur de conversion de format pour afficher une valeur entière décimale non signée de type 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 respectivement, équivalent à u pour unsigned int
(constante macro)
PRIo8 PRIo16 PRIo32 PRIo64 PRIoLEAST8 PRIoLEAST16 PRIoLEAST32 PRIoLEAST64 PRIoFAST8 PRIoFAST16 PRIoFAST32 PRIoFAST64 PRIoMAX PRIoPTR
(C++11)
spécificateur de conversion de format pour afficher une valeur entière octale non signée de type 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 respectivement, équivalent à o pour unsigned int
(constante macro)
PRIx8 PRIx16 PRIx32 PRIx64 PRIxLEAST8 PRIxLEAST16 PRIxLEAST32 PRIxLEAST64 PRIxFAST8 PRIxFAST16 PRIxFAST32 PRIxFAST64 PRIxMAX PRIxPTR
(C++11)
spécificateur de conversion de format pour afficher une valeur entière hexadécimale non signée en minuscules de type 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 respectivement, équivalent à x pour unsigned int
(constante macro)
PRIX8 PRIX16 PRIX32 PRIX64 PRIXLEAST8 PRIXLEAST16 PRIXLEAST32 PRIXLEAST64 PRIXFAST8 PRIXFAST16 PRIXFAST32 PRIXFAST64 PRIXMAX PRIXPTR
(C++11)
spécificateur de conversion de format pour afficher une valeur entière hexadécimale non signée en majuscules de type 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 respectivement, équivalent à X pour unsigned int
(constante macro)
Constantes de format pour la famille de fonctions std::fscanf
SCNd8 SCNd16 SCNd32 SCNd64 SCNdLEAST8 SCNdLEAST16 SCNdLEAST32 SCNdLEAST64 SCNdFAST8 SCNdFAST16 SCNdFAST32 SCNdFAST64 SCNdMAX SCNdPTR
(C++11)
spécificateur de conversion de format pour saisir une valeur entière décimale signée de type 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 respectivement, équivalent à d pour int
(constante macro)
SCNi8 SCNi16 SCNi32 SCNi64 SCNiLEAST8 SCNiLEAST16 SCNiLEAST32 SCNiLEAST64 SCNiFAST8 SCNiFAST16 SCNiFAST32 SCNiFAST64 SCNiMAX SCNiPTR
(C++11)
spécificateur de conversion de format pour saisir une valeur entière signée décimale/octale/hexadécimale de type 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 respectivement, équivalent à i pour int
(constante macro)
SCNu8 SCNu16 SCNu32 SCNu64 SCNuLEAST8 SCNuLEAST16 SCNuLEAST32 SCNuLEAST64 SCNuFAST8 SCNuFAST16 SCNuFAST32 SCNuFAST64 SCNuMAX SCNuPTR
(C++11)
spécificateur de conversion de format pour saisir une valeur entière décimale non signée de type 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 respectivement, équivalent à u pour unsigned int
(constante macro)
SCNo8 SCNo16 SCNo32 SCNo64 SCNoLEAST8 SCNoLEAST16 SCNoLEAST32 SCNoLEAST64 SCNoFAST8 SCNoFAST16 SCNoFAST32 SCNoFAST64 SCNoMAX SCNoPTR
(C++11)
spécificateur de conversion de format pour lire une valeur entière octale non signée de type 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 respectivement, équivalent à o pour unsigned int
(constante macro)
SCNx8 SCNx16 SCNx32 SCNx64 SCNxLEAST8 SCNxLEAST16 SCNxLEAST32 SCNxLEAST64 SCNxFAST8 SCNxFAST16 SCNxFAST32 SCNxFAST64 SCNxMAX SCNxPTR
(C++11)
spécificateur de conversion de format pour saisir une valeur entière hexadécimale non signée de type 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 respectivement, équivalent à x pour unsigned int
(constante macro)

Synopsis

#include <cstdint>
namespace std
{
    using imaxdiv_t = /* voir description */;
    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);            // optionnel, voir description
    constexpr imaxdiv_t div(intmax_t, intmax_t); // optionnel, voir description
}
#define PRIdN /* voir description */
#define PRIiN /* voir description */
#define PRIoN /* voir description */
#define PRIuN /* voir description */
#define PRIxN /* voir description */
#define PRIXN /* voir description */
#define SCNdN /* voir description */
#define SCNiN /* voir description */
#define SCNoN /* voir description */
#define SCNuN /* voir description */
#define SCNxN /* voir description */
#define PRIdLEASTN /* voir description */
#define PRIiLEASTN /* voir description */
#define PRIoLEASTN /* voir description */
#define PRIuLEASTN /* voir description */
#define PRIxLEASTN /* voir description */
#define PRIXLEASTN /* voir description */
#define SCNdLEASTN /* voir description */
#define SCNiLEASTN /* voir description */
#define SCNoLEASTN /* voir description */
#define SCNuLEASTN /* voir description */
#define SCNxLEASTN /* voir description */
#define PRIdFASTN /* voir description */
#define PRIiFASTN /* voir description */
#define PRIoFASTN /* voir description */
#define PRIuFASTN /* voir description */
#define PRIxFASTN /* voir description */
#define PRIXFASTN /* voir description */
#define SCNdFASTN /* voir description */
#define SCNiFASTN /* voir description */
#define SCNoFASTN /* voir description */
#define SCNuFASTN /* voir description */
#define SCNxFASTN /* voir description */
#define PRIdMAX /* voir description */
#define PRIiMAX /* voir description */
#define PRIoMAX /* voir description */
#define PRIuMAX /* voir description */
#define PRIxMAX /* voir description */
#define PRIXMAX /* voir description */
#define SCNdMAX /* voir description */
#define SCNiMAX /* voir description */
#define SCNoMAX /* voir description */
#define SCNuMAX /* voir description */
#define SCNxMAX /* voir description */
#define PRIdPTR /* voir description */
#define PRIiPTR /* voir description */
#define PRIoPTR /* voir description */
#define PRIuPTR /* voir description */
#define PRIxPTR /* voir description */
#define PRIXPTR /* voir description */
#define SCNdPTR /* voir description */
#define SCNiPTR /* voir description */
#define SCNoPTR /* voir description */
#define SCNuPTR /* voir description */
#define SCNxPTR /* voir description */