Open ClaudioDaffra opened 6 years ago
i have triedto run 42_function_pointer.c example but gives me an error about function pointer : bad type declaration <-- int (*f)(int) = &fred;
#include <stdio.h> int fred(int p) { printf("yo %d\n", p); return 42; } int (*f)(int) = &fred; int main() { printf("%d\n", (*f)(24)); return 0; }
i have triedto run 42_function_pointer.c example but gives me an error about function pointer : bad type declaration <-- int (*f)(int) = &fred;