Difference between doing #include<limit.h> and #include <climit>

Difference between doing #include<limit.h> and #include <climit>?
The header <climits> defines a set of manifest (#define) constants.

The header <limits.h> is deprecated, including it has the same effect as placing names from <climits> in the global namespace.

The preprocessor does not understand scoping rules, and for this particular header (which defines constants defined with #define), there is no practical difference between the two; except that the header <limits.h> may be removed from C++ in a future revision.

Favour #include <limits> http://en.cppreference.com/w/cpp/header/limits over #include <climits>
Topic archived. No new replies allowed.