linux 实现error lookup

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

int main(int argc, char* argv[])
{
    int num = 0;
    if(argc!=2)
    {
        printf("usage:%s n\n",argv[0]);
        return 0;
    }

    num = atoi(argv[1]);

    printf("Error #%d: %s\n", num, strerror(num));
    return 0;
}
原文地址:https://www.cnblogs.com/ahuo/p/2630388.html