Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
Neither infinity nor negative infinity exists in C++. The closest you can get are minimum and maximum value of int and other primitive types. By including <limits> and use std::numeric_limits<T>::min(), you can get the minimum value of type T(e.g. int).
19th Sep 2020, 5:26 PM
你知道規則,我也是
你知道規則,我也是 - avatar