char* ch="give string a value";
char*转化成CString cstr;
cstr=ch;
cstr.Format("%s",ch);
char*转化成string str;
string str(ch);
str.assign(ch);
char*转化为Int i;
itoa(i,ch,2); //按二进制方式转换
char* ch="give string a value";
char*转化成CString cstr;
cstr=ch;
cstr.Format("%s",ch);
char*转化成string str;
string str(ch);
str.assign(ch);
char*转化为Int i;
itoa(i,ch,2); //按二进制方式转换
转载于:https://www.cnblogs.com/aoyihuashao/archive/2009/12/14/1623859.html