Re: Bug??? ifstream fail on vc2005 express edition



I suppose you pass the full path to the function, not just the file name, in
(false) hope that the current directory is set to where the file is??

"Mars" <Mars@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1D06B188-BB8C-41CD-8ABF-838616E89072@xxxxxxxxxxxxxxxx
> Hi All:
> The following code run Ok in vc2003 toolkit,but failed on vc2005
> express
> edition:
>
> void ReadMatrixFile(const char *lpszFileName)
> {
> ifstream InFile;
>
> // open file
> InFile.open(lpszFileName, ios_base::in);
> if (!InFile.is_open())
> {
> cout << "File Open Failed:" << lpszFileName endl;
> return;
> }
> }
>
> anybody can tell me what's wrong???
> thx!


.



Relevant Pages