Converting from CString to char

This is a discussion on Converting from CString to char within the Windows Programming forums, part of the Platform Specific Boards category; I'm trying to make an HTML tag converter.. it will accept a file name, and convert all HTML tags within ...

Converting from CString to char

I'm trying to make an HTML tag converter.. it will accept a file name, and convert all HTML tags within it to the specified uppercase or lowercase. However, I need to convert some CStrings to chars to be used as the filename. This is what I have so far, but it's crashing when I run it, and debug points to my conversion.