Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Until the early 1980s, large software development projects had a continual problem with the inclusion of headers. One group might have produced a graphics.h, for example, which started by including io.h. Another group might have produced keyboard.h, which also included io.h. If io.h cannot could not safely be included several times, arguments would break out about which header should include it. Sometimes an agreement was reached that each header should include no other headers, and as a result, some application programs started with dozens of #include lines, and sometimes they got the ordering wrong or forgot a required header.

...

Consequently, the first time that header.h is #include'd, all of its contents are included. If the header file is subsequently #include'd again, its contents are bypassed.

...