Suppose you have developed a system with the file dependencies indicated in the following diagram. Further suppose that you have developed appropriate header files, and that you have arranged for each of the ordinary files to include the appropriate header files.
*-------------------------------* | *------------* | *------* | | v v | v diamonds.cxx rubies.cxx gems.cxx jewelry.cxx --------* ^ | | perfume.cxx ------* | | | | | *---------------------------------> flowers.cxx ---* | | | | | | | advisor.cxx v v v gifts.cxx
Now, suppose that gifts.h
accidentally contains a definition for an
ordinary function. Why would that function definition cause a problem when
you try to compile the advisor
program? How can you resolve the
problem?