You get the integer limits in <limits.h>
or <climits>
. Floating point characteristics are defined in <float.h>
for C. In C++, the preferred version is usually std::numeric_limits<double>::max()
(for which you #include <limits>
).
As to your original question, if you want a larger integer type than long
, you should probably consider long long
. This isn't officially included in C++98 or C++03, but is part of C99 and C++11, so all reasonably current compilers support it.