Der Andere wrote:
>
> Say I have a project containing four files: a.cpp, a.h, b.cpp and b.h, where
> a.h is included in a.cpp and b.h is included in b.cpp.
> Can I make cross-references from a to b. For instance, can I use a class
> defined in b.cpp in a.cpp?
Yes.
> Or do I have to add '#include "b.cpp" ' into
> a.cpp?
No. You include the header file b.h
It (should) contain everything needed to make a.cpp
compileable. For this the compiler only needs to know
that some class exists and what public members it has (in
order to check for function names, argument lists, etc). All
of this is written down in the header file.
You then compile a.cpp. compile b.cpp and link the result of
both compile steps to form the executable.
--
Karl Heinz Buchegger