ChinaUnix.net
相关文章推荐:

endl和n的区别

cout << "\n"; 与 cout << endl;两句的本质区别何在呢? 这两种写法的的本质区别何在呢?

by ggyy66 - C/C++ - 2009-09-04 18:23:17 阅读(2162) 回复(3)

相关讨论

刚在学习中,菜鸟请教: [quote]//Compute two integer's sum #include using namespace std; main() {int a,b; int sum; cout<<"please enter one integer:"<endl; cin>>a>>endl; cout<<"please enter another integer:"<endl; cin>>b>>endl; sum=a+b; cout<<"sum of the two integer is:"<endl; system("pause"); return 0; }[/quote] 为什么加上红色那两个“endl”就编译不过去呢?去掉则可以:shock:...

by 灵犀一指 - C/C++ - 2008-02-26 11:45:00 阅读(2363) 回复(5)

如何解释它呢? 它输出什么? 偶尔在C++ primer answer book上看到的。

by THEBEST - C/C++ - 2004-04-20 15:46:26 阅读(2902) 回复(8)

请问一下#include using std::cout using std::endl class Time{} 中的“ using std::cout” “ using std::endl” 是什么意思? 我刚开始学习C++,请高人指点。

by zz8184791 - C/C++ - 2008-03-02 20:43:14 阅读(3008) 回复(1)

[code] string s="我"; cout<endl; [/code] 为什么输出是3呢??? 如题所述。 看官指点! [ 本帖最后由 lemonniu 于 2008-9-16 17:08 编辑 ]

by lemonniu - C/C++ - 2008-09-16 17:38:33 阅读(4286) 回复(20)

cout<<"i is "<<1/2+1<<endl; 输出是1,为何? 用的codeblock默认设置。

by user2003 - C/C++ - 2008-07-27 19:45:13 阅读(2094) 回复(4)

平常见的都是cout<<15<<endl; 哪位高手诠释一下: cout<endl;

by yuonunix - C/C++ - 2007-09-19 20:13:35 阅读(3333) 回复(5)

本帖最后由 dcssy 于 2013-09-03 10:22 编辑 求高手指教,不甚感激。 此程序是判断如何使用主函数的返回值的。编译器是:Dev-Cpp 5.4.2 TDM-GCC x64 4.7.1 程序如下: #include using namespace std; int main() { cout<<"a"<<endl; system("pause"); return 0; cout<<"b"<<endl; system("pause"); return 0; } 程序报错如下: 后来我把程序改了一下:加了一个 #include 程...

by dcssy - C/C++ - 2013-09-03 20:39:21 阅读(4102) 回复(14)