Im not sure if this is a c or c++ question so I apologise if im in the wrong
place.
I want to convert a char* to a long.
However the number that I want to convert appears to be one digit to long to
be converted. Is there any way around this ??
This is what im trying to do.
char *z = "15132770200";
long lShair = atol(z);
The answer it gives is -2047098984
If I reduce the string by one char like so
char *z = "1513277020";
long lShair = atol(z);
I get 1513277020
Is there any way around this ??
Thanks in advance
Gizmo