Click here to Skip to main content
15,881,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to convert 12 digit number in CString to integer?
Posted

You need a __int64 variable to store such a large value. Then you may use the _tcstoi64[^] function.
 
Share this answer
 
v2
 
Share this answer
 
Comments
Gokulnath007 1-Mar-13 7:49am    
I am looking for CString to Integer.. and not the reverse?
Gokulnath007 1-Mar-13 8:03am    
I have tried this

unsigned long long nIp= _wtoi(strip);

where strip is a CString contains 641103000009 and after this statement, nIp always contains
2147483647.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900