Created
September 25, 2014 16:52
-
-
Save fkaa/9b4a7e17ef17b2b361c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stoff.h" | |
//expands into 'class stoff;' | |
//without the include guard (#ifndef), the following: | |
#include "stoff.h" | |
#include "stoff.h" | |
#include "stoff.h" | |
//would expand into: | |
class stoff; | |
class stoff; | |
class stoff; | |
//leading to multiple definitions | |
other_stuff(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef A_MACRO | |
#define A_MACRO | |
class stoff; | |
#endif // A_MACRO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment