Any function in A.cpp which is not meant to be called from outside A.cpp should be declared static and should not have a prototype in A.h . Its prototype should appear in A.cpp . A source file X.cpp is dependent on a header file Y.h if X.cpp includes Y.h . An object file X.obj is dependent on a source file Y.cpp if X.obj is produced by compiling Y.cpp . An executable file X.exe is dependent on an object file Y.obj if Y.obj is one of the object files linked to produce X.exe .
Dependencies are transitive.
If X is dependent on Y and Y is dependent on Z , then X is dependent on Z . There are also dependencies which are not shown, but which can be derived. For example, program.exe depends on one.h . When we build a program, we compile every source file then link the object files together to produce an executable file. In the example above, we would compile one.cpp , two.cpp , and three.cpp , then link one.obj , two.obj , and three.obj to produce program.exe .