Hi. I see people declare functions as 'extern' in header (.h) files.
Is this what I should be doing?
someheader.h
func.cCode:/* someheader.h */ extern int func(int a, int b);
I usually do the same as above, but don't put the 'extern' in frontCode:/* func.c */ #include "someheader.h" int func(int a, int b) { return a * b; }
of the function declaration in the header file, and it seems to work.
Is this ok, or should I prepend it with extern?
thanks alot