1.关于
还在到处找 errno对应的含义? 自己动手,很方便可找到其明确的含义
2. 动手
- 2.1 创建 c++源文件,输入下面的代码:
#pragma once
#include <iostream>
#include <fstream>
#include <errno.h>
#include <string.h>
using namespace std;
int main(int argc, char *argv[])
{
cout << "it is starting.....\n\n\n";
ofstream out_file;
out_file.open("errno.txt", ios::out | ios::trunc );
for (int i = 0; i < 135; i++)
{
out_file << "errno=" << i << ", " << strerror(i) << endl;
}
out_file.close();
cout << "it ended .....\n\n\n";
return 0;
}
- 2.2 编译输出结果, 一个例子,我这里输出的是 main可执行程序,执行mai