Check file object is open or not, when use a method of File object which is not open will lead a runtime error.
Use this function before you call the method of File object.
BOOL IsOpen( )
True of success, else false
//This function opens/creates the file c:\test.txt.
string strFile = "C:\\test.txt";
bOK = ff.Open(strFile, file::modeCreate | file::modeWrite); //create a new write only file and open it
out_str("failed to open the file");
if( ff.IsOpen() )
printf("The ff file is open"); //The string should be output
ff.Close(); //Close the ff file