I run the following program in keil software....it shows printf ANSI-style prototype error.... please give a clue for correcting the error...
#include "Main.h" #include "show.h" #include "PRINTF51.c" void sho_inti(void) { int (*fnptr)(); fnptr=show; printf("Address of function:%u",&show); (*fnptr)(); } void show(void) { printf("\n function called using pointer"); }
If your function pointer should take zero parameters then you should have specified "void" in the parameter list.
But why are you playing with function pointers?
View all questions in Keil forum