编译错误第4行“BOOL CFile::Open(LPCTSTR,UINT,CFileException *)”: 不能将参数 1 从“const char *”转换为“LPCTSTR”,
//加载JPG文件到内存
1 BOOL CJPGinDBDlg::LoadJPGFile(const char *pPathname)
2 {
3 CFile file;
4 if( !file.Open( pPathname, CFile::modeRead) )
5 return FALSE;
6 m_nFileLen = file.GetLength();
}
{
basic_string<TCHAR> pNewPathname = _T(pPathname);
CFile file;
if( !file.Open( pNewPathname.c_str(), CFile::modeRead) )
return FALSE;
m_nFileLen = file.GetLength();
}
http://shitou7630.blog.163.com/blog/static/3269953620149205115487/