社区
C语言
帖子详情
about endl?
yumengshuyuan
2001-03-11 09:44:00
各位仁兄,
我想知道下面的各个代码什么含义。
cout<<endl<<endl<<in.rdbuf()<<endl
这是一段从C++思想中输出流里的代码,
一般输出都是下面的行式如
cout<<"file.size="<<sp<<endl,
即结果是file.size=value(sp),
可上面的三个endl是什么意思呀?
...全文
114
2
打赏
收藏
about endl?
各位仁兄, 我想知道下面的各个代码什么含义。 cout<<endl<<endl<<in.rdbuf()<<endl 这是一段从C++思想中输出流里的代码, 一般输出都是下面的行式如 cout<<"file.size="<<sp<<endl, 即结果是file.size=value(sp), 可上面的三个endl是什么意思呀?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
neptune
2001-03-11
打赏
举报
回复
endl不只换行哦
std::cout << endl;
就相当于:
std::cout << '\n';
std::cout.flush();
Jessielee
2001-03-11
打赏
举报
回复
输出一个换行
cout<<"file.size="<<sp<<endl,
结果是file.size=value(sp),
cout<<"file.size="<<endl<<sp<<endl,
即结果是file.size=
value(sp),
HDU1075“What Are You Talking
Ab
out”
cout, the value is "<<iter->second<<
endl
; } Else { cout<<"Do not Find"<<
endl
; } #include<iostream> #include<cstdlib> #include<cstdio> #include<cstring> #include<cmath> #include...
What Are You Talking
Ab
out
What Are You Talking
Ab
out Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/204800 K (Java/Others) Total Submission(s): 24944 Accepted Submission(s): 8417 Problem DescriptionIgna
[C++] Use
Endl
Judiciously
Do you know that the statement cout is
ab
out 4 times as slow as cout , because
endl
performs an fflush(stdout)?
hdu 1075 What Are You Talking
Ab
out
cout<<ite->first<<' '<<ite->second<<
endl
;*/ getline(cin, a); getline(cin, a); while(1) { getline(cin, a); b.clear(); if(a!="END") { len = a.size(); for(i=0; i; i++) { if( isalpha(a[i]) )...
[待解决]C++ primer中有关
endl
刷新输出流
Forgetting to do so may cause output to be left in the buffer if the program crashes, leading to incorrect inferences
ab
out where the program crashed. 程序员经常在调试过程中插入输出语句,这些语句...
C语言
69,371
社区成员
243,082
社区内容
发帖
与我相关
我的任务
C语言
C语言相关问题讨论
复制链接
扫一扫
分享
社区描述
C语言相关问题讨论
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章