Hello Daniweb,
I've ran against an issue in my code and i'm not sure why I receive an error. I've managed to reproduce the error with the following code:
#ifdef _WIN32
#define PERFORMANCE_METING
#endif
#ifdef PERFORMANCE_METING
#include <windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
typedef enum { FALSE, TRUE } Boolean;
int main()
{
return 0;
}
This code gives me the following error for the line where the typedef is:
error: syntax error before numeric constant
Could anyone tell me why what I did is not allowed?
Besides that I was wondering if it was possible to check 2 symbols in 1 line with ifdef. (e.g. ifdef _WIN32 && PERFORMANCE_METING or something) or can I only use #if defined(_WIN32) && defined(PERFORMANCE_METING) for that?
Thanks in advance,
Gonbe.
-edit-
It doesn't seem to like include <windows.h> for some reason.
Do not know why though.
-edit-
Windef.h has a definition for FALSE and TRUE.. guess that's the issue.