Skip to content

Instantly share code, notes, and snippets.

@KatrinaHoffert
Created November 24, 2014 03:03
Show Gist options
  • Save KatrinaHoffert/1e8c6d14f6e26f0de8a5 to your computer and use it in GitHub Desktop.
Save KatrinaHoffert/1e8c6d14f6e26f0de8a5 to your computer and use it in GitHub Desktop.
Demonstration of include guards -- now with include guards
#ifndef _AAA_H_
#define _AAA_H_
int foo();
#endif
#include "xxx.h"
#include "yyy.h"
int main() {
return 0;
}
#ifndef _XXX_H_
#define _XXX_H_
#include "aaa.h"
#endif
#ifndef _Y_H_
#define _YYY_H_
#include "aaa.h"
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment