I'm not sure what I'm doing wrong, but I know that something isn't right.
managePassage is of type bool. A value, either true or false is returned by the called function. fileIn and fileOut are of type ifstream and ofstream, respectively.
The rest of the variable shouldn't come into play here, so I don't think it's necessary to explain what they are or to include any declarations or initializations. However, if you would find that information helpful then I'll be happy to provide it.
The problem I'm having is that the case always equates to 1, even when it should be 0. My functions seem to be working as they should be...everything was going fine until I got to this part.
Code:int main() { managePassage = FindWordEW(fileOut, puzzle, currentWord); while(fileIn) { switch(managePassage) { case 1: break; case 0: managePassage = FindWordWE(fileOut, puzzle, currentWord); switch(managePassage) { case 1: break; case 0: fileOut << "not found" << endl; } } fileIn.ignore(255, '\n'); fileIn.get(currentWord, MAXWORDLENGTH); } return 0; }



LinkBack URL
About LinkBacks




