Let\'s say I have a CString variable carrying the string \"Bob Evans\". I want to copy from position 4 until the end of the original CString to a new CString, but I am having tr
It isn't all that hard to turn a CString
into a standard string; the only glitch is that you're probably using Unicode if you take the default settings for your MFC program. That means you'll want to use std::wstring
instead of std::string
.
I haven't tested this, but I think the default conversions will let this 'just work'. Otherwise cast the CString to LPCTSTR.
std::wstring copyOfOriginal(original);