hi,
My string (a CString) contains a minimum free disk space as follow
"1099511627776" and the method to get the free disk space gives 64 bits int.
So I want to convert my string into a 64 bits int so I can compare the 2
values.

I used to use atoi, but I don't know if it supports 64 bits int (I guess
not). What would be the best way to do what I want?

I found _strtoi64, but how do I use this thing? what is the 2nd parameter
supposed to do?

thanks

ThunderMusic

Re: is there a way to convert a string (containing a number) into a 64bit integer variable? by Doug

Doug
Wed Jul 30 14:15:40 CDT 2003

ThunderMusic wrote:

>hi,
> My string (a CString) contains a minimum free disk space as follow
>"1099511627776" and the method to get the free disk space gives 64 bits int.
>So I want to convert my string into a 64 bits int so I can compare the 2
>values.
>
>I used to use atoi, but I don't know if it supports 64 bits int (I guess
>not). What would be the best way to do what I want?
>
>I found _strtoi64, but how do I use this thing? what is the 2nd parameter
>supposed to do?

I talked about strtoul in this message, but _strtoi64 works the same way:

http://groups.google.com/groups?selm=8e7rat8eb2dligms03cv041fpj4h0ki6dp%404ax.com

--
Doug Harrison
Microsoft MVP - Visual C++