Infinity

In C++, use numeric_limits<int>::max() to get ints maximum value, which is equivalent to .

You can also do the same for float numeric_limits<float>::max()

There is also this… Else, you can use infinity() if you really need infinity, which is in float or double.