When I enter "q" or "Q", I would think that would make the while portion of the do/while loop false which would allow the program to proceed to exitPage(), however the loop just continues. What am I doing wrong?
Let's imagine that optionSelected.at(0) is 'Z'. Z is not q, so the left side is true. Z is not Q, so the right side is true. So the whole thing comes out as true.
Let's imagine that optionSelected.at(0) is 'q'. q is q, so the left side is false. q is not Q, so the right side is true. So the whole thing comes out as true.
Let's imagine that optionSelected.at(0) is 'Q'. Q is not q, so the left side is true. Q is Q, so the right side is false. So the whole thing comes out as true.
Can you think of ANYTHING that optionSelected.at(0) could be such that (optionSelected.at(0) != 'q') || (optionSelected.at(0) != 'Q')
does NOT come out as true? No, you cannot.
Did you perhaps mean (optionSelected.at(0) != 'q') && (optionSelected.at(0) != 'Q')?