Sign in
Log inSign up
Anam Ansari

63 likes

372 reads

2 comments

Wilfred Almeida
Wilfred Almeida
Feb 9, 2023

I tried putting the menu in a loop.

read_line() appends to the String choice so the newly given input won't be processed.

To deal with this, call the choice.clear() before calling read_line() in the loop.

1
1 reply
Anam Ansari
Anam Ansari
Author
Feb 11, 2023

Correct!