In the header file (funlist.h
), I listed all the function prototypes such as:
int sum(int a,int b);
float prod(float c,float d);
After that, when I define what "sum" and "prod" are in one C source file (operator.c
), do I have to #include "funlist.h"
at the beginning?
I compiled and found both include or not include can get the right result. I'm confused why and looking forward to having a explanation.