首页 > 其他 > 详细

APUE1.7出错处理

时间:2015-01-29 21:01:33      阅读:292      评论:0      收藏:0      [点我收藏+]

技术分享

技术分享

技术分享

#include "apue.h"
#include <errno.h>

int main(int argc, char *argv[])
{
    fprintf(stderr, "EACCES: %s\n", strerror(EACCES));
    errno = ENOENT;
    perror(argv[0]);
    exit(0);
}
all: mycat hello testerror
mycat: ls1.c
	g++ -g -Wall ls1.c ../lib/libapue.a -I ../include -o ls1
hello: hello.c
	g++ -g -Wall hello.c -I ../include/ ../lib/libapue.a -o hello
testerror: testerror.c
	g++ -g -Wall testerror.c -I ../include/ ../lib/libapue.a -o testerror
clean:
	rm ls1 hello testerror

 

技术分享

 

 

 

技术分享

APUE1.7出错处理

原文:http://www.cnblogs.com/sunyongjie1984/p/4260720.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!