注册 登录
编程论坛 C++教室

[求助]提问--为什么这个程序我要击两次回车才会出现结果呢

crazyc 发布于 2007-03-13 22:00, 472 次点击

#include <iostream>
#include <string>
int main()
{ using namespace std;
string str;
std::cout<<"Please input your name:\n";
getline(cin,str);
std::cout<<"Hello,"<<str<<"!!\n";

}

2 回复
#2
yuyunliuhen2007-03-13 22:11
看看这里,可以好到你要的答案..
https://bbs.bc-cn.net/viewthread.php?tid=123419
#3
crazyc2007-03-14 06:35

thank you !!

1