Skip to content

Instantly share code, notes, and snippets.

@graphitemaster
Forked from anonymous/stdin.txt
Created July 13, 2012 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graphitemaster/3104074 to your computer and use it in GitHub Desktop.
Save graphitemaster/3104074 to your computer and use it in GitHub Desktop.
stdin
#if FOO_H == 1
#error Cyclic include
#endif
#ifndef FOO_H
#define FOO_H 1
stuff;
#undef FOO_H
#define FOO_H 0
#endif
@graphitemaster
Copy link
Author

include FILE

ifndef FOO_H

define FOO_H

stuff;

else

undef FOO_H

error Cyclic Include

endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment