MFC way for _int64 into CString conversion and CStrimg into _int64

Hi, experts!

Is there is a way to convert
 _int64 into CString
 and
 CStrimg into _int64

thanx
khlausterAsked:
Who is Participating?
 
jkrCommented:
Yes:

#include <stdlib.h>

__int64 i1 = 42L;
CString tmp;

tmp.Format("%I64d", i1);

__int64 i2 = _atoi64((LPCTSTR)tmp);
0
 
khlausterAuthor Commented:
Works great!

One more thing:

if any limitation for using  _int64 and these types of conversions:
OS,  etc

thanks, Jkr!
0
 
jkrCommented:
Well, CString limits that conversion to MFC, but that's it basically.
0
 
khlausterAuthor Commented:
thanks again
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.