字符转换

1. CString  转 char*

字符转换
int m_ID(0);
CString name;
name.Format(_T("bookUC%d.txt"),m_ID);
std::wstring _name=name;
_bstr_t t = _name.c_str();
char* pchar = (char*)t;
字符转换

2. wstring  转 string

wstring ws;
_bstr_t t = ws.c_str();
char* pchar = (char*)t;
string result = pchar;

字符转换

上一篇:FileInputStream.FileOutputStream执行图片复制


下一篇:读取键盘录入