// Multibytes인 겨우
CString cs("Hello");
std::string s((LPCTSTR)cs);
// Unicode인 경우
CString cs ("Hello");
// Convert a TCHAR string to a LPCSTR
CT2CA pszConvertedAnsiString (cs);
// construct a std::string using the LPCSTR input
std::string strStd (pszConvertedAnsiString);
(출처) http://forums.codeguru.com/showthread.php?231155-C-String-How-to-convert-between-CString-and-std-string
댓글 없음:
댓글 쓰기