Skip to content

Instantly share code, notes, and snippets.

@Frodox
Created June 11, 2013 10:06
Show Gist options
  • Save Frodox/5755804 to your computer and use it in GitHub Desktop.
Save Frodox/5755804 to your computer and use it in GitHub Desktop.
If the compiler does not support C99, you can define bool type yourself.
#include <stdbool.h>
– Keith Thompson
If the compiler does not support C99, you can define bool type yourself:
// file : myboolean.h
#ifndef MYBOOLEAN_H
#define MYBOOLEAN_H
#define false 0
#define true 1
typedef int bool; // or #define bool int
#endif
@Frodox
Copy link
Author

Frodox commented Jun 11, 2013

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