vs2010 Visula C++ 把CString 转换为string 类型
这样写不行:
CString m_fileTitle;
m_fileTitle += _T("ok.bat");
string url(m_fileTitle);
VS2010默认是UNICODE的库,参考
CString strSomeCstring ("This is a CString Object"); // Use ANSI variant CStringA to convert to char*; construct from it - std::string strStdString (CStringA (strSomeCstring));
这样言简意赅。