3 ms·
> Moreover, the header file is optional, and is never included by the source file. That is totally opposite to my experience. Example from Linux: https://gith
by dingo_bat 8y ago
> Moreover, the header file is optional, and is never included by the source file.
That is totally opposite to my experience. Example from Linux:
https://github.com/torvalds/linux/blob/master/kernel/smpboot.c https://github.com/torvalds/linux/blob/master/kernel/smpboot...
https://github.com/torvalds/linux/blob/master/kernel/smpboot.h https://github.com/torvalds/linux/blob/master/kernel/smpboot...
- frankzinger 8y agoYeah. If you don't include the header from the source file you will inevitably end up with differing function signatures in the header and source files because the compiler won't be able to compare the declaration and definition to each other. Such a program may even link.