I try to get inputs via text file. I can take the all inputs in the text file but while loop didn't stop. It takes over and over. Here is the code block;
ifstream inFile;
inFile.open("infixData.txt", std::fstream::in | std::fstream::out | std::fstream::app);
if(inFile.is_open()){
while (!inFile.eof()){
getline(inFile, inputInfix);
getInfix(inputInfix);
showInfix();
}
}
inFile.close();
I didn't understand why eof() function dont stop the loop. I tried with it bad() function too, It gets worse.