Compare to a defined constants in C?
- by J.W.
I am trying to compare to a defined constants in C, and I have simplified my program to the following..
#include "stdio.h"
#include "stdlib.h"
#define INVALID_VALUE -999;
int main(int argc, const char* argv[])
{
int test=0;
if(test==INVALID_VALUE) //The error line..
return INVALID_VALUE;
return 0;
};
And when I use gcc to compile. it gives out error "error: expected ‘)’ before ‘;’ token"
Any reason that this cannot be done.