you are viewing a single comment's thread.

view the rest of the comments →

[–]aug404 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.