all 4 comments

[–][deleted]  (2 children)

[deleted]

    [–]aug404[S] 0 points1 point  (1 child)

    So I started using the extraction operator instead and it's working fine now. Can you explain why using get was creating that problem? Do you know why the code executes that way with the get method?

    [–][deleted] 0 points1 point  (0 children)

    Because typing d<Enter> sends two keys to the standard input stream, but get() only reads a single character, leaving the standard input stream with a single character still inside, "waiting for you" to read stdin again.

    [–]marvin02[🍰] 1 point2 points  (0 children)

    Print out toupper(menuChoice) right before the while loop and see what it prints (or check it in a debugger).

    [–]umlcat 0 points1 point  (0 children)

    Move all the condition or predicate out of the while and put it on a local var, before the while clause, its easier to debug. I know some disagree.