APUE_1.8DemonstrateStrerrorAndPerror

/*
 * 1.8DemonstrateStrerrorAndPerror.cpp
 *
 *  Created on: Feb 11, 2015
 *      Author: sunyj
 */

#include "../apuesunyj.h"

int main(int argc, char *argv[])
{
	fprintf(stderr, "EACCES: %s\n", strerror(EACCES));
	errno = ENOENT;
	perror(argv[0]);
	return 0;
}

 

6c64fe9b822201d8141195f5b2aedd856e2ca2bf-95af-4c2d-8144-5d86db5cd0d7_size131_w640_h6407a7fe13598878e4397cc28e0158bd09e7c55f54a5ede27e47eea6fe26a386987

posted @ 2015-02-11 11:10  孙永杰  阅读(328)  评论(0编辑  收藏  举报