CString类型与int类型的互相转换

//CString To int
CString n1 = "100";	
int   n2=atoi((LPTSTR)(LPCTSTR)n1);


//int To CString
int n1 = 200;
CString n2;
n2.Format("%d", n1);


你可能感兴趣的:(n2)