I’m working on some code I didn’t write and noticed that there are many extern void my_func();.
My understanding is that extern in for global variables, not for functions.
Is there a practical reason to declare a function as extern rather than putting it in a header file and including that? Or is this just a stylistic choice?
This is only needed if, for some reason, the header file doesn’t declare the function. And
externis always unnecessary for functions, as functions are alwaysexternby default.