Re: Large text files and searching text
Kahlua wrote:
Both suggested forms of fopen also give errors. See below.
None of the methods in the helpfile seem to allow filename to be a CString?
void CAdelphiDlg::OnLbnSelchangeList1()
{
int nSelect;
nSelect = c_List1.GetCurSel();
CString cSelect;
c_List1.GetText( nSelect, cSelect );
CString JobFile;
JobFile = _T("C:\\AdelphiCP\\Cip3\\"); //re-apply main part of
path to files
JobFile += cSelect; //add filename selected
JobFile += _T(".cip"); //re-apply file extension
CString mess;
mess.Format(_T("Would you like to load \"%s\" as top ?"), cSelect);
int a = AfxMessageBox(mess, MB_ICONQUESTION | MB_YESNO);
if(a != IDYES)
return;
FILE *in;
in = _tfopen(JobFile, "rb");
error C2664: '_wfopen' : cannot convert parameter 2 from 'const char [3]' to
'const wchar_t *'
in = _wfopen(JobFile, "rb");
error C2664: '_wfopen' : cannot convert parameter 2 from 'const char [3]' to
'const wchar_t *'
}
Kahlua:
I'm sorry, but do you not think for yourself at all? Is it not obvious what the
issue is here? The error message describes the problem exactly.
--
David Wilkinson
Visual C++ MVP