errno 사용법

Programing/C언어 | 2007/05/13 00:35 | adioshun

#include <errno.h> 포함.


printf("errno = %d\n", errno);


해당 errno 의 값 확인은


asm-generic/errno.h

asm-generic/errno-base.h


에서 확인할 수 있다.


#include<stdio.h>
#include<string.h>
#include<errno.h>
#include<fcntl.h>
#include<sys/stat.h>
#include<sys/types.h>

 

int main()
{
        int             fd;
        int             temp_errno;
        extern int      errno;

        fd = open("/woojinnesdfasdttest",O_RDWR);
        perror("open");
        printf("fd : %d\nerrno : %d\n",fd,errno);

        return 0;
}

/usr/include/asm/errno.h



참고 :

http://blog.naver.com/endfirst/20018919109

http://blog.naver.com/lucisky/80024165984


2007/05/13 00:35 2007/05/13 00:35
Trackback address :: http://4ellene.net/tt/trackback/1162
  1. firstplus financial american consumer finance financial debts reliefs union

    Tracked from firstplus financial american consumer finance financial debts reliefs 2008/12/03 06:52  삭제

    juices deployments tinnier reawakens reproducible

Comments List

  1. yola porn 2008/05/24 00:45

  2. Celine Bags 2012/05/14 15:27

    WOW, 여보. 당신이 가진 좋은 블로그. 그 친구가 예전의 그것을 보관 정말 놀랍습니다.

Write a comment.

[로그인][오픈아이디란?]