expected primary expression

Basic Program to display a binary digit with 4 leds. Cannot for the life of me get it to compile. Please help?

#define redLed 8
#define greenLed 9
#define blueLed 10
#define whiteLed 11
#define buttonPress
#define button 12
#define count

void setup() {
// put your setup code here, to run once:
pinMode (redLed, OUTPUT);
pinMode (greenLed, OUTPUT);
pinMode (blueLed, OUTPUT);
pinMode (whiteLed, OUTPUT);
pinMode (button, INPUT);

}

void loop() {
// put your main code here, to run repeatedly:
buttonPress = digitalRead(button);
/* Binary Table

  • 1 = 1000
  • 2 = 0100
  • 3 = 1100
  • 4 = 0010
  • 5 = 1010
  • 6 = 0110
  • 7 = 1110
  • 8 = 0001
  • 9 = 1001
  • 10 = 0101
  • Green = 1000
  • Red = 0100
  • Blue = 0010
  • White = 0001
    */

if(buttonPress == HIGH){
++count;
}

if(count == 1){
digitalWrite(greenLed, HIGH);

}
else if(count==2){ //Binary 0100
digitalWrite(redLed, HIGH);

}
else if(count==3){
digitalWrite(greenLed, HIGH);
digitalWrite(redLed, HIGH);
}
else if(count==4){
digitalWrite(blueLed, HIGH);
}
else if(count==5){
digitalWrite(greenLed, HIGH);
digitalWrite(blueLed, HIGH);
}
else if(count==6){
digitalWrite(redLed, HIGH);
digitalWrite(blueLed,HIGH);
}
else if(count==7){
digitalWrite(greenLed, HIGH);
digitalWrite(redLed, HIGH);
digitalWrite(blueLed, HIGH);
}
else if(count==8){
digitalWrite(whiteLed, HIGH);
}
else if(count==9){
digitalWrite(greenLed, HIGH);
digitalWrite(whiteLed, HIGH);
}
else if(count==10){
digitalWrite(redLed, HIGH);
digitalWrite(whiteLed, HIGH);
}
}

Why #define count?

#define count
versus int count

#define count

You define count as nothing. That's fine.

But then you say:

if(count == 1)

So when the preprocessor replaces "count" with nothing you have:

if( == 1)

which is obviously an error.

A #define is for constants that don't ever change. It's just a find and replace. If you want count to be able to change then it needs to be an int (or whatever data-type is most appropriate)

I get it. Thanks Guys!