Error of invalid operands to binary expression

Dear Expert,

I am having a problem with if statement below.

 if ((Dz_mcErrors & 128) != 0) 

here I want to select the flag 128 from mcErrors and checking if this value is non-zero.

But its giving following error:

I am not sure how to solve this problem.
Please help me to sort it out.


Try: if (((unsigned long)Dz_mcErrors & 128) != 0)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.