int->CString:
CString strInt;
strInt.Format("%d",800);
CString ->int:
CString str("800");
int iNumber=atoi(LPCTSTR(str));
or:
sscanf(LPCTSTR(str),"%d",&iNumber);
or://one byte each time
int len=str.GetLength();
int iNumber=0;//this is the result
for(int i=0;i<len;i++){
if(str.GetAt(i)<'0'||str.GetAt(i)>'9') break;
iNumber=iNumber*10+str.GetAt(i)-'0';
}
//now u can deal with iNumber