Mahen
What is the exact message of the compiler?
I think the error is, that the compiler does not find the definition of ON
and OFF. Is it in the same source file?
If not, try to put it into an .h file and include it where you need it.
Stephan
"Mahen" schrieb im Newsbeitrag
news:101-50650000000800000011150000-982303670000@quiq.com...
> Preprocessor command, assigned the variable and then compare the
> variable to int.
>
> How can I get around this?
>
> #define ON 1
> #define OFF 0
> in seperate code
>
> int variable = ON;
> variable is globally define for that module.
> in seperate code
> if (variable == ON)
> {
>
>
> }
>
> the complier errors off on the if (variable==ON)
> My guess variable is variable in of type int and ON is a preprocessor
> c
ommand. Therefore it is a mismatch and complier doesn't like it. How
> can I get around this.
> thank
> Mahen