mfc 字符总结,char* cString相互转换

xiaoxiao2021-02-28  11

1.统计宽字节字符串的长度

wchar_t * p2 = L "bbb"; num = wcslen(p2);

2.//char* 与 CString之间的转换 C++ cstring .C_str() // char* –> CString

char* p3 = "ccc"; CString str = CString(p3);

3.CString —> char*

CStringA tmp; tmp = str; char* pp = tmp.GetBuffer();
转载请注明原文地址: https://www.6miu.com/read-1100032.html

最新回复(0)