cout<<endl;什么意思?
2016-06-23 10:52
1626 查看
cout是c++语言的输出符号。endl是程序的结束符。
cout<<endl是使程序输出结束。
1.程序实例
int a=2;
int c=3;
int b=(a>c)?2:3;
cout<<"b:"<<b<<endl;
这样的结果是b为3
cout<<endl是使程序输出结束。
1.程序实例
int a=2;
int c=3;
int b=(a>c)?2:3;
cout<<"b:"<<b<<endl;
这样的结果是b为3
cout<<"z:"<<z<<endl; //输出 z: 2 // cout 相当于 printf();是输出函数 cout<<"z:"<<z<<endl; <=> printf("z:%d\n",z); z=a>b?a:a>b?a:b;的意思是 从左往右 ,a>b?a:a>b... 1>2?a:a>b ...=>a>b.... =>a>b?a:b =>1>2?1:2 =>z=2
相关文章推荐
- 显示日期
- Use Apache HttpClient to Post json data
- 如何成为一名完美的传道授业解惑者
- android post请求
- php使用curl判断网页404(不存在)的方法[原创]_php技巧_脚本之家
- Spring mvc 自带的以流形式提供下载方法
- 浅谈Dubbo服务框架
- 数据库性能优化一:数据库自身优化(大数据量)
- php foreach 遍历细节探讨
- 112. Path Sum
- MVC过滤器之 OnActionExcuted
- Hbase-0.98.6源码分析--MVCC多版本并发控制技术
- java自定义注解
- SAMBA客户端提示 NT_STATUS_HOST_UNREACHABLE 错误提示的解决办法
- Camera预览图像拉伸
- Spring加载resource时classpath*:与classpath:的区别
- 用递归算法判断一个数组是否递增
- linux内核 asmlinkage宏
- java多线程--线程休眠
- dump文件的初体验