Because the rabbits.h
header file contains a function prototype for
the rabbits
function, rabbits.h
provides the information the
C++ compiler needs to compile the two other files, previous.cxx
and penultimate.cxx
. Accordingly, you should include
rabbits.h
in both previous.cxx
and penultimate.cxx
.
You should also include each header file in its corresponding source-code file. That way, should there be any discrepancy between the function prototype provided in the header file and the function definition provided in the source-code file, your C++ compiler should note the discrepancy and complain.
Thus, each of your source-code files should contain at least one included header file, and may contain several.