Versions Compared

Key

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

...

Code Block
languagec
#ifndef SOME_ARBITRARY_UNIQUE_CODE
#define SOME_ARBITRARY_UNIQUE_CODE
//.... body of header file goes here.
#endif // end of the block which started at line 2

...

So how do you make a unique arbitrary code? There is more than one way to solve to solve this problem:

  • Have convention that maps the file name of the header file to a unique code

  • Or use something like a Globally Unique IDentifier - GUID.