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"); }
There are serious issues with using function pointers in Keil C51!
You need to carefully study the documentation and ensure that you really understand the issues before continuing with this...
Just put "Function Pointer" into the 'Search' box, and see what you get...