strerror
2016-06-16 10:11
274 查看
#include <iostream> #include <stdio.h> #include <time.h> #include <string.h> #include <errno.h> using namespace std; int main(int argc, char *argv []) { char sz [] = "Hello, World!"; //Hover mouse over "sz" while debugging to see its contents cout << sz << endl; //<================= Put a breakpoint here char * mesg = strerror(ENOENT); printf("%d\n", ENOENT); printf("%s\n", mesg); if (remove("/home/test") == 0) { printf("ok\n"); } else { char * mesg = strerror(errno); printf("%d\n", errno); printf("%s\n", mesg); } return 0; } /* Hello, World! 2 No such file or directory 2 No such file or directory */
相关文章推荐
- 看Cognos+SPSS如何无缝对接BI+Data Mining
- 利用Apache AB测试Web引擎性能
- 使用循环语句绘制图案-2
- try catch finally 用法
- MySQL性能优化经验
- Xamarin Forms启动自带模拟器缓慢
- JS模块化编程--AMD规范学习01
- Spring4+Struts2+Hibernate 搭建示例
- HDU 2639 Bone Collector II
- python filter函数
- Unity视频播放的各种实现方式汇总
- C变量及函数存储类型
- pull解析一些特殊类型的XML文件
- uitableview cell上加载webview
- go性能调优2
- SQLite3 测试程序
- 360应用认领时遇到的问题时,我的解决方法.
- Android:interpolator
- Xamarin Forms启动自带模拟器缓慢
- IQKeyboardManager基本使用心得