static ifstream& openFileForRead(string fileName) { ifstream inFile; inFile . open ( fileName.c_str(), std::ifstream::in ); if ( !inFile.good () ) { fprintf(stderr,"Couldn't open file '%s'...\n",fileName.c_str()); inFile.close(); return inFile; } return inFile; }