In my readFile.h file, I define
void readFileInformation(string filename)
in readFile.cpp file, I define
void readFile::readFileInformation(string filename) {
ifstream inFile;
infile.open(filename.c_str(), ifstream::in);
...
}
in main.cpp file, I used
string filename="mgolfinput.txt"
readFile filereader;
filereader.readFileInformation(filename.c_str());
but for some reason, I couldn't open file. I did try to change path of .txt file as well.