Yes, it is caused by the return character.
所在版块:求学狮城 发贴时间:2003-05-12 18:25

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
To ignore the return character, you can add the following line in you code before input.

cin.ignore();

This line is to remove the return character from the std input stream.

I happened to have tried this today.

Any comment is welcome.
.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

Put your OWN COOL signature here!
 相关帖子 我要回复↙ ↗回到正文
问一个关于c++ input 的问题。。 我行故我   (939 bytes , 493reads )
多谢kikicoco 和 魅力十足 我行故我   (0 bytes , 171reads )
抛砖引玉 kikicoco   (495 bytes , 208reads )
Yes, it is caused by the return character. 魅力十足   (238 bytes , 267reads )
why fflush(stdio) cannot work?? kikicoco   (0 bytes , 232reads )
Hehe, 魅力十足   (68 bytes , 216reads )
No, your explanation is wrong. Flying   (241 bytes , 149reads )
还以为能兼容... kikicoco   (29 bytes , 160reads )