标题:[求助]提问--为什么这个程序我要击两次回车才会出现结果呢
只看楼主
crazyc
Rank: 1
等 级:新手上路
帖 子:28
专家分:0
注 册:2006-8-5
 问题点数:0 回复次数:2 
[求助]提问--为什么这个程序我要击两次回车才会出现结果呢

#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";

}

搜索更多相关主题的帖子: 回车 结果 要击 提问 
2007-03-13 22:00
yuyunliuhen
Rank: 6Rank: 6
等 级:贵宾
威 望:20
帖 子:1435
专家分:0
注 册:2005-12-12
得分:0 
看看这里,可以好到你要的答案..
http://bbs.bc-cn.net/viewthread.php?tid=123419

Go confidently in the  directions of your dreams,live the life you have imagined!Just do it!
It is no use learning without thinking!
2007-03-13 22:11
crazyc
Rank: 1
等 级:新手上路
帖 子:28
专家分:0
注 册:2006-8-5
得分:0 

thank you !!

2007-03-14 06:35



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-124082-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.087861 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved