14.c++输入cin,cerr,clog。
来源:互联网 发布:rhino mac授权码 编辑:程序博客网 时间:2024/06/06 05:35
cin
#include <iostream> using namespace std; int main( ){ char name[50]; cout << "请输入您的名称: "; cin >> name; cout << "您的名称是: " << name << endl; }
cerr
#include <iostream> using namespace std; int main( ){ char str[] = "Unable to read...."; cerr << "Error message : " << str << endl;}
clog
#include <iostream> using namespace std; int main( ){ char str[] = "Unable to read...."; clog << "Error message : " << str << endl;}
使用 cerr 流来显示错误消息,而其他的日志消息则使用 clog 流来输出
阅读全文
0 0
- 14.c++输入cin,cerr,clog。
- cin,cerr,clog,cout
- 复习c++: 继承 , static, cerr , cout , clog
- cerr和cout clog
- cerr, cout , clog
- cerr cout clog
- cerr和clog
- cout cerr clog
- cout、cerr与clog
- 帮助理解cerr、cout、clog
- cerr、clog、cout的区别
- 专-cerr,clog,cout区别
- cout,cerr,clog的区别
- clog,cout,cerr 输出机制
- clog,cout,cerr 输出机制
- 转:cerr cout clog 的区别
- c++中cout、cerr、clog的区别
- C++中cout、cerr、clog的区别
- 方法和构造器的区别
- 解决IE禁止第三方Cookie
- [jvm]对象的创建
- #游戏unity#协程
- Android Studio的gradle项目构建
- 14.c++输入cin,cerr,clog。
- linux 卸载mysql
- jedis客户端操作redis主要三种模式
- Java接口以及多态性简单理解
- 第十四周OJ-Q83解题方法
- 敏捷软件开发学习笔记<一>
- 467. Unique Substrings in Wraparound String Medium
- 汽车电子标识协议(类LLRP协议)wireshark插件
- AndroidStudio 插件 之 Findbugs 安装与简单使用教程