#include "hgeoinput.h" // Function to read filenames from initialization-file and // to store them in the array fName int HGeoInput::readFileNames() { ifstream fin; fin.open(sourceFile,ios::in); if(fin.fail()) { cerr << "failed to open file " << sourceFile << endl; return HFAILURE; } HString fileName(' ',120); int found=0; while(!fin.eof()) { fin >> fileName; if (fileName.empty() || fileName(0,2)=="//") fin.getline(fileName,120); else { if (found) fName[noFiles++]=fileName; else { if (fileName==key) found=1; } } } fin.close(); if (noFiles>0) return HSUCCESS; else return HFAILURE; } // Function to show all filenames void HGeoInput::showFileNames() { for(int i=0;i