Jump to content

C++: Difference between revisions

293 bytes added ,  24 October 2019
No edit summary
Line 197: Line 197:
===Limits===
===Limits===
<code>#include <limits></code><br>
<code>#include <limits></code><br>
[https://en.cppreference.com/w/cpp/types/numeric_limits Reference]<br>
C++ has standard macros such as <code>INT_MAX</code>.<br>
The limits header adds these limits for every type.<br>
<syntaxhighlight lang="cpp">
// Equivalent to FLT_MAX
std::numeric_limits<float>::max();
</syntaxhighlight>


==Containers==
==Containers==