In linux, this tiny piece of code gives me the following error-Code:int func(int a,int b); { return(a+b); } typedef int (*AddFp)(int,int); int main() { AddFp addf; addf=&func; return 0; }
Can someone please tell me why I'm getting this error?Code:sample.c:3:1: error: expected identifier or ‘(’ before ‘{’ token
Thanks in advance!