Need help about string convert from CString to char point
Hi,
I am trying to convert from CString to char point. I tried your code, but when I use system command, it doesn't work. Please help. Thanks.
..............
//Doesn't work
CString MyString = "c:userstest.txt";
char * szMyString = (char *) (LPCTSTR) MyString;
system(szMyString);
................
//this one Works, but my string is CString
char * szMyString="c:userstest.txt"; //good code
system(szMyString); //good code