C++ CString转char* char*转CString
char* 转CString很简单
代码:
char* strBuf="Hello world";
CString cstrBuf=strBuf;
CString转char*
代码
CString cstrBuf=L"Hello world";
USES_CONVERSION;
char * strbuf = T2A(cstrBuf);
本文详细介绍了在C++中如何将CString类型转换为char*类型,以及如何将char*类型转换为CString类型。提供了具体的代码示例,包括使用T2A函数进行宽字符到多字节字符的转换。
char* 转CString很简单
代码:
char* strBuf="Hello world";
CString cstrBuf=strBuf;
CString转char*
代码
CString cstrBuf=L"Hello world";
USES_CONVERSION;
char * strbuf = T2A(cstrBuf);

被折叠的 条评论
为什么被折叠?