请教程序:为什么该程序在VS2005中运行总出现错误?(错误提示粘贴到程序最后)
nt _tmain(int argc, TCHAR* argv[], TCHAR* envp[]){
int nRetCode = 0;
// initialize MFC and print and error on failure
if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0))
{
// TODO: change error code to suit your needs
_tprintf(_T("Fatal Error: MFC initialization failed\n"));
nRetCode = 1;
}
else
{
// TODO: code your application's behavior here.
CFile file("\\VC教程\\MyFile.txt",CFile::modeReadWrite);
ULONGLONG m_nLen=file.GetLength();
char str[80];
file.Read(&str,m_nLen);
for(int i=0;i<m_nLen;i++)
cout<<str[i];
cout<<endl;
file.Close();
}
return nRetCode;
}
为什么改程序在VS2005中运行总提示如下错误,请各位高手指教。
1>e:\myfile\myfile\myfile.cpp(34) : error C2664: 'CFile::CFile(LPCTSTR,UINT)' : cannot convert parameter 1 from 'const char [19]' to 'LPCTSTR'