Link to home
Start Free TrialLog in
Avatar of Gareon
Gareon

asked on

Conversion of CString digits to an int

Does anyone know how to convert digits stored in a CString to an int value?
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ooops - to elaborate a bit on 'strtol()'
--> begin quote

long strtol( const char *nptr, char **endptr, int base );

The strtol function converts nptr to a long. strtol stops reading the string nptr at the first character it cannot recognize as part of a number. This may be the terminating null character, or it may be the first numeric character greater than or equal to base.
<-- end quote