Strtol() and atol() do not convert strings larger than 9 digits

while working on an application that requires converting strings to long numbers the atol() and strtol() could not convert any string larger than 9 digits correctly.

strtol would prompt a number that has nothing to do with the string, while atol results in a negative number (overflow).

any idea why this is happening and how can i fix it?

7
задан Nataly 11 February 2011 в 17:55
поделиться