Hey guys,
I wrote this code and it compiles but when I go to test it, it does not do any of the options except withdraw and ignores the while loop. Any ideas on how I could fix this? Let me know.
while (userInput != "q" && userInput != "Q" && so on);
What you had was comparing userInput with "b" and then using "B" as a boolean value, which being non-zero would equate to true. So your if was saying, "if (userInput == "b" || true)"
Also, is "q*" an actual expected option, or are you trying to check that the string starts with q?
If it's the latter, that won't work - it's comparing the literal string "q*", not applying wildcards.
Try using, userInput[0] to get at the first character of the string (but make sure you check it has at least one character, or you'll get an exception - use userInput.length()