Answers for "cstring to string"

C++
0

cstring to string

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);
Posted by: Guest on October-08-2021

Browse Popular Code Answers by Language