CString to long
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Hi all How can i convert CString to long.I am try this
CString Content="000995688787";
int newintval=atoi(Content);
result is
newintval=225212472
and
__int64 n64Tmp=_atoi64(Content);
result is
n64Tmp=225212472You must have used
atol
(or rather_ttol
) instead ofatoi
. SeeCString::Format()
member if you're already usingCString
.It is a crappy thing, but it's life -^ Carlo Pallini