[LC++]Smallest int -2147483648 or -2147483647?

Paul Gearon gearon at ieee.org
Wed Sep 4 19:31:14 UTC 2002


On Wed, 4 Sep 2002, Vincent Penquerc'h wrote:
> #include <limits.h>
> 
> You then have INT_MIN, INT_MAX, etc.
> 
> Or, since I just noticed this is the C++ list:

This is, of course, the Right Way (TM).

I just came up with that suggestion as a way of getting around the quirky
bit of code:
  int const minInt = -2147483648;

Predefined constants or macros are much better

Paul





More information about the tuxCPProgramming mailing list