方法一:
CString str;
char s[50];
strcpy(s,str.GetBuffer(0));
方法二:
CString str;
char* s;
s = (LPSTR)(LPCTSTR)str;
ps:CString类提供了一大批很好用的函数用来对字符串操作,完全可以替代字符数组对字符串操作
方法一:
CString str;
char s[50];
strcpy(s,str.GetBuffer(0));
方法二:
CString str;
char* s;
s = (LPSTR)(LPCTSTR)str;
ps:CString类提供了一大批很好用的函数用来对字符串操作,完全可以替代字符数组对字符串操作