How do I evaluate bool in a IF statement between a positive and negative integer in C++? -
I am comparing a variable in my program that is against a negative number in my Arduino project. The scratch code is as follows -
int y = 40; If (y & lt; -100) {do something; } However, when I try to verify my code in the Arduino IDE, I have been greeted with this error message,
sketch_apr23a. Ino: 'zero loop' in function: sketch_apr23a: 32: error: '0000' was not declared in this scope I'm assuming it because - negative of 100 Contrary to the signal, some types of operators probably?
If one statement in C ++ is the best way to compare an integer against a negative integer?
Thanks !!!!!!
> Edit - I do not believe that I had typed an El there, sorry to waste my time with me some time! However, I really appreciate you for your help, and my code is verified right after right, thank you very much! After completing my 12 minutes, I will accept my first answer!
I think you are confused l00 and 100 < / code>.
Comments
Post a Comment