I can't get past this...
With code such as this taken from MFC Help:
//example for CFile::Open
char* pFileName = "test.dat";
if( !f.Open( pFileName, CFile::modeCreate | CFile::modeWrite, &e ) )
afxDump << "File could not be opened " << e.m_cause << "
The compiler chokes with the error "cannot convert parameter 1 from 'const char *' to 'LPCTSTR' "
If I change code to:
if( !f.Open( LPCTSTR (pFileName), CFile::modeCreate | CFile::modeWrite, &e ) )
then the compiler is happy but pFileName passed to CFile::Open points to junk.
I'm no MFC wiz, so excuse me if I am doing something dumb. By the way, the code used to work fine in an older version of Visual Studio. I am using the 2005 version now.