std::numeric_limits<int>::max() is not infinity, it's just a very large integer, usually 2^31-1 or 2^63-1. Integers don't have an infinity value. Furthermore, std::numeric_limits<T>::max() is not infinity for any T. std::numeric_limits<T>::infinity().
afaik u/int8/16/32/64_t don't have an "infinite" value, they go from min to max and then warp around.
in C float and double have a +inf and -inf value, but it's not a value, it's a flag, u can read it with isinf() and sigbit() i think.
The best is to open math.h and read it, it's all inside along with the functions' description
i don't know how to set it to inf, never had to, but there should be a macro or something like that
You can get an "infinity" value from the macros in <float.h> (or <cfloat> in C++).
The isinf() and like functions are found in <math.h> (or <cmath> in C++), but they are non-standard in C90 and C++, so you won't find them available in every C environment.