一、Unicode-------------------------------------------------
1、CString ——》const char*
CString str;
CStringA stra(str.GetBuffer(0));
str.ReleaseBuffer();
string st(stra.GetBuffer(0));
const char* cs = st.c_str();
本文介绍了如何将CString对象转换为const char*类型的过程。通过使用CStringA和string类作为中间步骤,实现了从CString到标准C字符串指针的转换。
一、Unicode-------------------------------------------------
1、CString ——》const char*
CString str;
CStringA stra(str.GetBuffer(0));
str.ReleaseBuffer();
string st(stra.GetBuffer(0));
const char* cs = st.c_str();
588

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