ArduinoMega2560 Piano Programming

For our senior project in engineering, my friend and I are building an Arduino piano. We’ve been following the instructions on The BIG Arduino Piano! Use Pulse Width Modulation to Dance like Tom Hanks - Projects but the code keeps saying certain aspects are undeclared. We’ve tried changing the code, but we aren’t sure what exactly is wrong with it. It would be really helpful if anyone can take a look and give us any insight as to what is wrong!
-K

BIG_Button_Keyboard.zip (1.37 KB)

You will get a lot less help if you insist on making people download and unzip your stuff. Read the "how to use the forum" stickies to see how to format and post code. If the sketch is too large to post you can attach it. Post the entire text of any error messages, too.

You must declare all variables so that the compiler can set aside memory for them. See Arduino - VariableDeclaration

KitI13:
For our senior project in engineering, my friend and I are building an Arduino piano. We've been following the instructions on https://www.allaboutcircuits.com/projects/the-big-arduino-piano-use-pulse-width-modulation-to-dance-like-tom-hanks/ but the code keeps saying certain aspects are undeclared. We've tried changing the code, but we aren't sure what exactly is wrong with it. It would be really helpful if anyone can take a look and give us any insight as to what is wrong!
-K

KitI13:
For our senior project in engineering, my friend and I are building an Arduino piano. We've been following the instructions on https://www.allaboutcircuits.com/projects/the-big-arduino-piano-use-pulse-width-modulation-to-dance-like-tom-hanks/ but the code keeps saying certain aspects are undeclared. We've tried changing the code, but we aren't sure what exactly is wrong with it. It would be really helpful if anyone can take a look and give us any insight as to what is wrong!
-K

There is NOTHING wrong!

fILE * BIG_Button_Keyboard.zip
contains one .ino sketch and one .h header file containing the pitches definitions for the musical notes..

Both files together compile error-free , I just tested compilation with Arduino 1.8.1.

If you see error messages, then YOU MESSED IT UP!

The code in your file attachment compiles flawlessly,

Do you need detailed compile instructions for the Arduino-IDE, or what?

I did download and unzip the code and it compiles without warnings or errors in IDE Ver 1.6.7 on my Win 10 machine.

#include "pitches.h"

int buttonC = 2;
int buttonCState = LOW;

int buttonD = 3;
int buttonDState = LOW;

int buttonE = 4;
int buttonEState = LOW;

int buttonF = 5;
int buttonFState = LOW;

int buttonG = 6;
int buttonGState = LOW;

int buttonA = 7;
int buttonAState = LOW;

int buttonB = 8;
int buttonBState = LOW;

int buttonC6 = 9;
int buttonC6State = LOW;

void setup() {

  pinMode(buttonC, INPUT);
  pinMode(buttonD, INPUT);
  pinMode(buttonE, INPUT);
  pinMode(buttonF, INPUT);
  pinMode(buttonG, INPUT);
  pinMode(buttonA, INPUT);
  pinMode(buttonB, INPUT);
  pinMode(buttonC6, INPUT);
  Serial.begin(9600);
}

void loop() {
  buttonCState = digitalRead(buttonC);
  buttonDState = digitalRead(buttonD);
  buttonEState = digitalRead(buttonE);
  buttonFState = digitalRead(buttonF);
  buttonGState = digitalRead(buttonG);
  buttonAState = digitalRead(buttonA);
  buttonBState = digitalRead(buttonB);
  buttonC6State = digitalRead(buttonC6);



  if (buttonCState == HIGH) {
    tone(10, NOTE_C5);
  }


  if (buttonDState == HIGH) {
    tone(10, NOTE_D5);
  }

  if (buttonEState == HIGH) {
    tone(10, NOTE_E5);
  }

  if (buttonFState == HIGH) {
    tone(10, NOTE_F5);
  }

  if (buttonGState == HIGH) {
    tone(10, NOTE_G5);
  }

  if (buttonAState == HIGH) {
    tone(10, NOTE_A5);
  }

  if (buttonBState == HIGH) {
    tone(10, NOTE_B5);
  }

  if (buttonC6State == HIGH) {
    tone(10, NOTE_C6);
  } 

  if (buttonCState == LOW && buttonDState == LOW &&
      buttonEState == LOW && buttonFState == LOW &&
      buttonGState == LOW && buttonAState == LOW &&
      buttonBState == LOW && buttonC6State == LOW) {
    noTone(10);
  }
}

Edit: Jurs beat me to it but I did too much work to waste it. And compiled on a different version of the IDE.