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