There are many methods available. But the easiest one in VS 2005 is to use the function CStringA. See the following code snippet.
CString CStr("This is a CString");
std::string Str = CStringA(CStr);
CStringA is a template specialization of class CStringT.
Posted by cppkid