Hey there, I'm real new to C programming and I have been getting this error every time i try to compile my code.
eg1.c: In function 'main':
eg1.c:10: error: parse error before "pid_t"
I have searched google and it says it has something to do with a semi colon missing but I have checked this simple code and nothing seems out of place. I need some help as my experience in programming c is very limited.
Here is the code below
Thanks for any help whatsoever
eg1.c: In function 'main':
eg1.c:10: error: parse error before "pid_t"
I have searched google and it says it has something to do with a semi colon missing but I have checked this simple code and nothing seems out of place. I need some help as my experience in programming c is very limited.
Here is the code below
Code:
/*pidemo.c - Displays process indentification information */
#include <stdio.h>
#include <sys/types.h> /* System specific types such as pid_t (below) */
int main()
{
pid_t my_pid;
my_pid = getpid();
printf("Hi! I am process #%d\n",pid_t);
}
Thanks for any help whatsoever