Link to home
Start Free TrialLog in
Avatar of thanesh
thanesh

asked on

How to change CString to a 64 bit integer

Hi Experts,

How can I change a CString to 64 bit integer?  
Avatar of rajeev_devin
rajeev_devin

CString str("2342353465664");

_atoi64(str.GetBuffer());
ASKER CERTIFIED SOLUTION
Avatar of rajeev_devin
rajeev_devin

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
Avatar of thanesh

ASKER

Hi Rajeev,

Thanks. Why would the first one be error prone?
Two reasons

1. GetBuffer(int nMinBufLength );  takes one parameter.

2. You need to store the converted value somewhere :)
__int64 data =