My C programming book says that when I want to create a static function, I need to put the static keyword in front of the function definition. It doesn\'t mention a
yes, yes you do need to put static in front of the declaration.
type this into ideone.com
int add();
int main(){
printf("%d",add());
return 0;
}
static int add(){
return 1+1;
}
you get this result: http://ideone.com/VzZCiE
now type this
static int add();
int main(){
printf("%d",add());
return 0;
}
static int add(){
return 1+1;
}
you get this: http://ideone.com/sz8HVR
boooom