Convert CString to const char *
If unicode not enabled
CString str = "Hello World";
char *c = (char *)(LPCTSTR)str;
If unicode support is enabled in the project
CString str = _T("Hello World");
string ss = string(CT2CA(str));
const char *cc = ss.c_str();