阅读背景:

getline(cin,name)导致看似永无止境的输入提示

来源:互联网 

I'm writing a program that needs to read user input into a string object. I'm using getline(cin, name), but when it gets to the prompt, I can type anything in and press enter, but it'll just go to the next line and the cursor will keep blinking, prompting for more input. Essentially, the prompt for input never seems to end, no matter how many characters I type or how many times I press enter. I don't even know if it's actually sending the input into the string object. What could be causing this?I'm writing a program that needs to read user i




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: