Hey Elysia,
I used your proposed statement in the following way, i.e.
There is no error raised when the value actually exceeds the limitation, instead after the conversion, the value of "number" is "2147483647".Code:if (strtol(_temp, NULL, 10)) { number = strtol(_temp, NULL, 10); }
In above example, _temp is "8729348702983457023894" read from the txt data file.
Bests,
Qing