#include <stdio.h>
/*
* Tell the compiler that we intend
* to use a function called show_message.
* It has no arguments and returns no value
* This is the "declaration".
*
*/
void show_message(void);
/*
* Another function, but this includes the body of
* the function. This is a "definition".
*/
main(){
int count;
count = 0;
while(count < 10){
show_message();
count = count + 1;
}
exit(0);
}
/*
* The body of the simple function.
* This is now a "definition".
*/
void show_message(void){
printf("hello\n");
}
srdjan@Zverko:~/Desktop/C-Progs$ gcc 1.c -o 1-p
1.c: In function ‘main’:
1.c:25: warning: incompatible implicit declaration of built-in function ‘exit’
srdjan@Zverko:~/Desktop/C-Progs$ ./1-p
hello
hello
hello
hello
hello
hello
hello
hello
hello
hello
srdjan@Zverko:~/Desktop/C-Progs$
Sta znaci ova nekompatibilnost (ovo je neki example sa net-a)?