so i wrote the following code:
DnaSequence fetchSequence(const string& fileName){
string sequence,line;
ifstream inFile(fileName);
inFile.seekg(0, ios::beg);
while(inFile) {
getline(inFile, line);
sequence.append(line);
}
inFile.close();
DnaSequence seq(sequence);
return seq;
}
int main(int argc,char* argv[]) {
DnaSequence dnaS = fetchSequence("readFrom.txt");
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
and for some reason it does not reach the code inside the while statement which means the file is not opened correctly although it's in the same directory what you think the problem might be?