CString to Integer
-
hai everybody., Can any say how to convert an CString to an integer value. I know to convert char buff[20] to an integer thro atoi function. Meanwhile if any one have any logical ideas or some thing special for convert the CString value to an integer value. I tried a lot. Thank in previous., Bye Anbudan., Shanmuga Sundar.V
-
hai everybody., Can any say how to convert an CString to an integer value. I know to convert char buff[20] to an integer thro atoi function. Meanwhile if any one have any logical ideas or some thing special for convert the CString value to an integer value. I tried a lot. Thank in previous., Bye Anbudan., Shanmuga Sundar.V
CString str = "123"; int i = atoi((LPCTSTR)str);
This is a valid conversion, CString explicitely supports a conversion to LPCTSTR. :-D Dominik
_outp(0x64, 0xAD);
and__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? ;) (doesn't work on NT) -
hai everybody., Can any say how to convert an CString to an integer value. I know to convert char buff[20] to an integer thro atoi function. Meanwhile if any one have any logical ideas or some thing special for convert the CString value to an integer value. I tried a lot. Thank in previous., Bye Anbudan., Shanmuga Sundar.V
That's the only way i know. There is wtoi which deals with wide char string to int. That's it. @!$h@
-
hai everybody., Can any say how to convert an CString to an integer value. I know to convert char buff[20] to an integer thro atoi function. Meanwhile if any one have any logical ideas or some thing special for convert the CString value to an integer value. I tried a lot. Thank in previous., Bye Anbudan., Shanmuga Sundar.V
Hi friend ,:) it is as smiple as that CString str="1235678"; int a = atoi(str.operator LPCTSTR()); now try this :) "This world is a compliler, I am compiling my life and trying to make it error free :D" Abhishek Srivastava Software Engg (VC++) India ,Noida Mobile no 9891492921 :)
-
hai everybody., Can any say how to convert an CString to an integer value. I know to convert char buff[20] to an integer thro atoi function. Meanwhile if any one have any logical ideas or some thing special for convert the CString value to an integer value. I tried a lot. Thank in previous., Bye Anbudan., Shanmuga Sundar.V
Hi, You can also use the Win32 API (Shell API) function if you want to avoid the CRT (C Run-Time Library) (If you use ATL/WTL for example) StrToInt(LPCTSTR lpSrc); Also check the others string functions from Win32 API (Platform SDK) and the Shell API (shlwapi.h). They mimic almost every string function from C++ library. Geraldo.