Go Down

Topic: #define BUTTON not recognized? (Read 1 time) previous topic - next topic


Day 2 of working with the board and just tryint to work through the examples here.

When I try to verify the press button example (exactly as it appears in teh book) the second #define statement (#define BUTTON 7) keeps giving an error message. The error says: "Unexpected unqualified-id before numeric constant."

I've tried all the fixes I can think of, checked the grammar for #define and even changed the variable name, all with no luck. The #define LED 13 statement immediately before this isn't causing a problem.

Can anyone see what the problem is here or steer me in the right direction?




Oh, never mind.

The syntax problem was on the NEXT line. No ; after the val statement.




That is a very important lesson, remember it well.
The error often is in the line before or after the one the compiler chokes on.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131