SyntaxFix
Write A Post
Hire A Developer
Questions
There is an explicit cast on CString to LPCTSTR, so you can do (provided unicode is not specified):
CString str; // .... const char* cstr = (LPCTSTR)str;