Hey everyone, I'm hoping you can help me with a simple question I've never been able to find a clear answer for.
Basically, let's just assume I'm making a program and have the following files:
Code:
a.h - defines/prototypes/typedefs for code in a.c
a.c - code
b.h - defines/prototypes/typedefs for b.c
b.c - code
common.h - defines and typedefs used in all code files
main.c - main() / other code
1. Does this make sense?
2. Assuming I have include guards and am compiling this into a single executable, where should my includes be? For example, I feel that I need to "#include a.h" in a.c, but what about "#include a.h" in main.c if I'm calling the functions there? And where should I include common.h?