string转char*
string str = "hello world";
char* pbuf = str.c_str();
char*转CString
CString cstr;
char* pbuf= "hello world";
str.format("%s",buf);
string转CString
CString cstr;
string str = "hello world";
str.format("%s",str .c_str());
CString转string
CString cstr = "hello";
string str(cstr.GetBuffer());
int转CString
int port = 8080;
CString cstrport;
cstrport.Format("%d",port);
CString转int
CString cstrport = "8080";
int port = atoi(cstrport);
float fport = atof(cstrport);