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.
September 2, 2008 at 1:25 pm
[...] My Experiments with C++ Sharing my ideas « How to convert CString to std::string in Visual Studio 2005 [...]
September 24, 2008 at 10:28 am
[...] Click to see how to convert CString to std::string [...]