-
is file open
hi
i have big problem with a simple thing
i can't check whether the file is open or not.
can somebody tell me translate the following questionmarks into c++ code. PLEASE HELP
thanks
in C
FILE * FpIn=NULL;
FpIn=fopen(FileName,"r");
if(FpIn!=NULL)
{
}
now in c++
ifstream InFile(FileName, ios::in);
if(?????????????????)
{
}
-
Re: is file open
Although I do not use template for my file input and output files (I use CFile and CStdioFile) it appears there is a member of the ifstream template called is_open, check that.