![]() |
![]() |
![]() |
![]() |
![]() |
|
The class definitions and function prototypes in the
containers.h and cars.h header files are all that
the C++ compiler needs to compile the trains.cxx file.
Similarly, the information in the containers.h header file
is all that the C++ compiler needs to compile
containers.cxx, and the cars.h header file is all
that the C++ compiler needs to compile cars.cxx:
containers.h cars.h
*--------------* *--------------*
| Class | --* | Class | --*
| definitions | | | definitions | |
*--------------* | *--------------* |
| |
trains.cxx containers.cxx | cars.cxx |
*--------------* *--------------* | *--------------* |
| main |<----* | Member- |<--| | Member- |<--|
| definition |<--* | | function | | | function | |
| | | | | definitions | | | definitions | |
*--------------* | | *--------------* | *--------------* |
| *---------------------* |
*-----------------------------------------------*