how to CString Variable to Integer data type
-
Hello friends, Can any one tell how to convert CString variable to integer data type? for example CString str1; int b; str1 = m_var1 ; m_var1 of string data type I want to assign str1 to b . Since str1 is type of CString , then is not possible to assign str1 to b. I need to convert the str1 variable to data type of b. then only the assign is possible. Can any one help me in this matter :)
-
Hello friends, Can any one tell how to convert CString variable to integer data type? for example CString str1; int b; str1 = m_var1 ; m_var1 of string data type I want to assign str1 to b . Since str1 is type of CString , then is not possible to assign str1 to b. I need to convert the str1 variable to data type of b. then only the assign is possible. Can any one help me in this matter :)
CString strNumber = _T("2006");
int nNumber = _ttoi(strNumber);
Nibu thomas Software Developer
-
Hello friends, Can any one tell how to convert CString variable to integer data type? for example CString str1; int b; str1 = m_var1 ; m_var1 of string data type I want to assign str1 to b . Since str1 is type of CString , then is not possible to assign str1 to b. I need to convert the str1 variable to data type of b. then only the assign is possible. Can any one help me in this matter :)
Hi phijophlip CString str; str="123"; int i=atoi(str);