首页 > 其他 > 详细

APUE_1.6PrintTheProcessID

时间:2015-02-11 09:13:26      阅读:295      评论:0      收藏:0      [点我收藏+]
 1 /*
 2  * 1.6PrintTheProcessID.cpp
 3  *
 4  *  Created on: Feb 11, 2015
 5  *      Author: sunyj
 6  */
 7 
 8 #include "../apuesunyj.h"
 9 
10 int main(void)
11 {
12     printf("hello world from process ID %ld\n", static_cast<long>(getpid()));
13     return 0;
14 }
 1 // apuesunyj.h
 2 #ifndef APUE_SUNYJ
 3 #define APUE_SUNYJ
 4 
 5 #include <errno.h>
 6 #include <stdio.h>
 7 #include <string.h>
 8 #include <stdarg.h>
 9 #include <stdlib.h>
10 #include <stdint.h>
11 #include <unistd.h>
12 
13 void err_quit(const char *fmt, ...);
14 void err_sys(const char *fmt, ...);
15 
16 
17 #endif

技术分享

技术分享

APUE_1.6PrintTheProcessID

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

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