【C11】errno

 The header <errno.h> defines several macros, all relating to the reporting of error conditions

#define _CRT_SECURE_NO_WARNINGS
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

int main(int argc, char *argv[])
{
    sqrt(-1.0);
    printf("%d %s\n", errno, strerror(errno));
    return 0;
}

 

 

posted on 2014-04-01 05:25  至死丶不渝  阅读(143)  评论(0编辑  收藏  举报

导航