K
Kristo
Since there's no strtoi function in standard C, I've been searching the
clc archives for the proper way to store the result of strtol to an
int. My search has yielded conflicting results. About half of the
results say to cast the result to an int. The other half say the cast
isn't necessary. And the third half say to compare the result to
INT_MAX and INT_MIN before assigning. Which is correct?
Kristo
clc archives for the proper way to store the result of strtol to an
int. My search has yielded conflicting results. About half of the
results say to cast the result to an int. The other half say the cast
isn't necessary. And the third half say to compare the result to
INT_MAX and INT_MIN before assigning. Which is correct?
Kristo