How to declare boolean on SGDK?
Posted: Wed Oct 03, 2012 3:13 am
Source code part of SDK types.h:
Code that crashes:
Code that output:
Code: Select all
/**
* \def FALSE
* FALSE define (equivalent to 0).
*/
#ifndef FALSE
#define FALSE 0
#endif
/**
* \def TRUE
* TRUE define (equivalent to 1).
*/
#ifndef TRUE
#define TRUE 1
#endif
/**
* \def NULL
* NULL define (equivalent to 0).
*/
#ifndef NULL
#define NULL 0
#endif
Code: Select all
bool beta;
Code: Select all
main.c||In function `main':|
main.c|17|error: `bool' undeclared (first use in this function)|
main.c|17|error: (Each undeclared identifier is reported only once|
main.c|17|error: for each function it appears in.)|
main.c|17|error: syntax error before "beta"|
||=== Build finished: 4 errors, 1 warnings ===|