C++: Converting an MFC CString to a std::string
I am using CString str(_T("Test"));typedef std::basic_string string_t;string_t resStr(str);It works because the CSting has a cast to LPTCSTR.
I am using
CString str(_T("Test")); typedef std::basic_string<tchar> string_t; string_t resStr(str);It works because the
CSting
has a cast to LPTCSTR
.