首页
技术人生
登录
6mi
u
盘
搜
搜 索
技术人生
CString转换成const char*或者LPCSTR
CString转换成const char*或者LPCSTR
技术
2024-11-29
16
++代码
//将CString转换成const char*
USES_CONVERSION; CString str = _T(
"要转换的字符"
);
const
char
* lpcs = NULL; lpcs = T2A(str.GetBuffer(str.GetLength())); C++代码
//将CString转换成LPCSTR
USES_CONVERSION; CString str = _T(
"要转换的字符"
);
LPCSTR
lpcs = NULL; lpcs = T2A(str.GetBuffer(str.GetLength()));
//LPCSTR其实就是const char*
转载请注明原文地址: https://ibbs.8miu.com/read-2261915.html
最新回复
(
0
)