Having an issue accessing values from a pointer
As Majenko mentioned in the comment, you created new local arrays in the constructor, but never put anything in the member arrays of the classes. They have the same name, but are not the same variable. Responsible for creating the new variable is the keyword int. However, you cannot simply assign array values by just omitting the int. Therer are multiple possibilities:


You can fill the array for each index: durations_shaveAndAHairCut[0] = 1;
You can copy your local array to the member variable with memcpy: memcpy((void*)this-&gt;durations_shaveAndAHairCut, (void*)durations_shaveAndAHairCut, 9*sizeof(int));
You can declare the arrays static in the class declaration and initialize it outside of the constructor in MelodyPlayer.cpp: 

int MelodyPlayer::durations_shaveAndAHairCut[] = {
    4, 8, 8, 4, 4, 4, 4, 4, 4};


I prefer the last option.