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

Vincent Penquerc'h Vincent.Penquerch at artworks.co.uk
Wed Sep 4 19:11:05 UTC 2002


> Will this work across all architectures?  Ie my understanding is
> that different architectures implement negatives in slightly 
> differing ways.

#include <limits.h>

You then have INT_MIN, INT_MAX, etc.

Or, since I just noticed this is the C++ list:

std::numeric_limits<int>::min() et al

(IIRC, I don't use them often).


-- 
Vincent Penquerc'h 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/tuxcpprogramming/attachments/20020904/c3dc9237/attachment.htm 


More information about the tuxCPProgramming mailing list