How do I convert CString into const char *? I have tried everything found on the internet but I still cant convert them.
Please help.
Thank you.
If your application is not Unicode, you can simple typecast to const char *. Use the GetBuffer() method if you need a char * that you can modify.
const char *
GetBuffer()
char *
If your application is Unicode and you really want a char *, then you'll need to convert it. (You can use functions like MultiByteToWideChar().)
MultiByteToWideChar()