Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

617
Vistas
Is there a standard macro in C or C++ represent the max and min value of int32_t, int64_t?

Is there any macro in C or C++ represent the max and min value of int32_t and int64_t? I know it can be literally defined by oneself, but it's better if there is a standard macro. Please note I'm not asking about max of int, long ,etc. but intXX_t

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

In C++, there is std::numeric_limits::min() and std::numeric_limits::max() in the <limits> header:

std::cout << std::numeric_limits<std::int32_t>::min() << std::endl;

and so on. In C, the header <stdint.h> defines INT32_MIN, INT32_MAX etc. These are also available in the C++ <cstdint> header.

over 4 years ago · Santiago Trujillo Denunciar

0

In C++ you can use header <limits> and class std::numeric_limts declared in this header.

To know the max and min values of types int32_t and int64_t you can write for example

#include <cstdint>
#include <limits>

//...

std::cout << std::numeric_limits<int32_t>::max() << std::endl;
std::cout << std::numeric_limits<int32_t>::min() << std::endl;
std::cout << std::numeric_limits<int64_t>::max() << std::endl;
std::cout << std::numeric_limits<int64_t>::min() << std::endl;

In C you should include header <stdint.h> and use corresponding macros defined in the header as for example

INT32_MIN
INT32_MAX
INT64_MIN
INT64_MAX
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda