loading

I need help with my arduino code, the error code is "stray #" . located at #define DO_NEXT 4

1.//iOS switch control example
2.//Simple version
3.#define MY_DEBUG 1
4.#include "BluefruitRoutines.h"
5.
6.//Pin numbers for switches
7.#define PREVIOUS_SWITCH A0
8.#define SELECT_SWITCH A1
9.#define NEXT_SWITCH A2
10.
11.//Actions
12.#define DO_PREVIOUS 1
13.#define DO_SELECT   2
14.#define DO_NEXT     4
15.
16.uint8_t readSwitches(void) {
17.  return (~(digitalRead(PREVIOUS_SWITCH)*DO_PREVIOUS
18.      + digitalRead(SELECT_SWITCH)*DO_SELECT
19.      + digitalRead (NEXT_SWITCH)*DO_NEXT)
20.     ) & (DO_PREVIOUS+ DO_SELECT+ DO_NEXT);
21.}
22.
23.//Translate character to keyboard keycode and transmit
24.void pressKeyCode (uint8_t c) {
25.  ble.print(F("AT+BLEKEYBOARDCODE=00-00-"));
26.  uint8_t Code=c-'a'+4;
27.  if (Code<0x10)ble.print("0");
28.  ble.print(Code,HEX);
29.  ble.println(F("-00-00-00-00"));
30.  MESSAGE(F("Pressed."));
31.  delay(100);//de-bounce
32.  while (readSwitches()) { //wait for button to be released
33.    /*do nothing*/
34.  };
35.  ble.println(F("AT+BLEKEYBOARDCODE=00-00"));
36.  MESSAGE(F("Released"));
37.}
38.
39.void setup() {
40.  if(MY_DEBUG)
41.  while (! Serial) {}; delay (500);
42.  Serial.begin(9600); Serial.println("Debug output");
43.endif
44.  pinMode(SELECT_SWITCH, INPUT_PULLUP);
45.  pinMode(NEXT_SWITCH, INPUT_PULLUP);
46.  pinMode(PREVIOUS_SWITCH, INPUT_PULLUP);
47.  initializeBluefruit();
48.}
49.
50.void loop() {
51.  uint8_t i=readSwitches();
52.  switch (i) {
53.    case DO_PREVIOUS: pressKeyCode('p'); break;
54.    case DO_SELECT:   pressKeyCode('s'); break;
55.    case DO_NEXT:     pressKeyCode('n'); break;
56.  }
57.}
void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}


Use const instead of define unless you really know what you are doing, what compiler version you require and how to assign unique names for a define.

https://www.arduino.cc/en/reference/define