CString,String,char *三者之间的互相转换

①String -> CString:

CString.format("%s", string.c_str());

②CString -> String:

string str(CString.GetBuffer(str.GetLength()));

③CString -> char *

lstrcpy(char *, CString, sizeof(char*));

④char * -> CString:

CString.format("%s", char*);

⑤String -> char *:

char *p=string.c_str();

⑥char * -> String:

string str(char*);






已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页