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
转载于:https://www.cnblogs.com/sunyongjie1984/p/4285255.html
转载请注明原文地址: https://win8.8miu.com/read-1480040.html