1. CString 转 char*
int m_ID();
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;