how to code infinity in c++ code example Example: infinity c++ #include <limits> // ... int a = std::numeric_limits<int>::max();