Code:
void playSound(std::string note, std::string note2){
CMelody songSound;
string one[] = {gF1, gF2, gF3, gF4, gF5, gF6, gF7, gF8, gF9,
dF1, dF2, dF3, dF4, dF5, dF6, dF7, dF8, dF9,
aF1, aF2, aF3, aF4, aF5, aF6, aF7, aF8, aF9,
eF1, eF2, eF3, eF4, eF5, eF6, eF7, eF8, eF9,
bF1, bF2, bF3, bF4, bF5, bF6, bF7, bF8, bF9,
F1, F2, F3, F4, F5, F6, F7, F8, F9,
C1, C2, C3, C4, C5, C6, C7, C8, C9,
G1, G2, G3, G4, G5, G6, G7, G8, G9,
D1, D2, D3, D4, D5, D6, D7, D8, D9,
A1, A2, A3, A4, A5, A6, A7, A8, A9,
E1, E2, E3, E4, E5, E6, E7, E8, E9,
B1, B2, B3, B4, B5, B6, B7, B8, B9};
EFrequency two [] = {keFS, keDS, keGS, keCS, keFS, keCS, keDS, keGS, keCS,
keCS, keAS, keDS, keGS, keCS, keGS, keAS, keDS, keGS,
keGS, keF, keAS, keDS, keGS, keDS, keF, keAS, keDS,
keDS, keC, keF, keAS, keDS, keAS, keC, keF, keAS,
keAS, keG, keC, keF, keAS, keF, keG, keC, keF,
keF, keD, keG, keC, keF, keC, keD, keG, keC,
keC, keA, keD, keG, keC, keG, keA, keD, keG,
keG, keE, keA, keD, keG, keD, keE, keA, keD,
keD, keRest, keE, keA, keD, keA, keRest, keE, keA,
keA, keFS, keRest, keE, keA, keE, keFS, keRest, keE,
keE, keCS, keFS, keRest, keE, keRest, keCS, keFS, keRest,
keRest, keGS, keCS, keFS, keRest, keFS, keGS, keCS, keFS};
int three[] = {ke8th, ke8th + ke16th, ke16th, ke8th + ke16th, ke8th, ke8th + ke16th, ke8th + ke16th, ke16th, ke8th + ke16th,
ke8th + ke16th, ke16th, ke8th + ke16th, ke16th, ke8th + ke16th, ke16th, ke16th, ke8th + ke16th, ke16th,
ke16th, ke8th, ke16th, ke8th + ke16th, ke16th, ke8th + ke16th, ke8th, ke16th, ke8th + ke16th,
ke8th + ke16th, ke8th + ke16th, ke8th, ke16th, ke8th + ke16th, ke16th, ke8th + ke16th, ke8th, ke16th,
ke16th, ke8th, ke8th + ke16th, ke8th, ke16th, ke8th, ke8th, ke8th + ke16th, ke8th,
ke8th, ke8th + ke16th, ke8th, ke8th + ke16th, ke8th, ke8th + ke16th, ke8th + ke16th, ke8th, ke8th + ke16th,
ke8th + ke16th, ke16th, ke8th + ke16th, ke8th, ke8th + ke16th, ke8th, ke16th, ke8th + ke16th, ke8th,
ke8th, ke8th + ke16th, ke16th, ke8th + ke16th, ke8th, ke8th + ke16th, ke8th + ke16th, ke16th, ke8th + ke16th,
ke8th + ke16th, ke16th, ke8th + ke16th, ke16th, ke8th + ke16th, ke16th, ke16th, ke8th + ke16th, ke16th,
ke16th, ke8th, ke16th, ke8th + ke16th, ke16th, ke8th + ke16th, ke8th, ke16th, ke8th + ke16th,
ke8th + ke16th, ke8th + ke16th, ke8th, ke16th, ke8th + ke16th, ke16th, ke8th + ke16th, ke8th, ke16th,
ke16th, ke16th, ke8th + ke16th, ke8th, ke16th, ke8th, ke16th, ke8th + ke16th, ke8th};
int four[] = {count_right_, count_up, count_left_, count_up, count_right_, count_up, count_up, count_left_, count_up,
count_up, count_straight, count_up, count_left_, count_up, count_left_, count_straight, count_up, count_left_,
count_left_, count_down, count_straight, count_up, count_left_, count_up, count_down, count_straight, count_up,
count_up, count_up, count_down, count_straight, count_up, count_straight, count_up, count_down, count_straight,
count_straight, count_right_, count_up, count_down, count_straight, count_down, count_right_, count_up, count_down,
count_down, count_up, count_right_, count_up, count_down, count_up, count_up, count_right_, count_up,
count_up, count_straight, count_up, count_right_, count_up, count_right_, count_straight, count_up, count_right_,
count_right_, count_upnD, count_straight, count_up, count_right_, count_up, count_upnD, count_straight, count_up,
count_up, count_around, count_upnD, count_straight, count_up, count_straight, count_around, count_upnD, count_straight,
count_straight, count_right_, count_around, count_upnD, count_straight, count_upnD, count_right_, count_around, count_upnD,
count_upnD, count_up, count_right_, count_around, count_upnD, count_around, count_up, count_right_, count_around,
count_around, count_left_, count_up, count_right_, count_around, count_right_, count_left_, count_up, count_right_};
string *this_string;
string one_;
EFrequency two_;
int three_;
int four_;
int string_index;
if((this_string = one) != NULL){
string_index = this_string - one;
one_ = one[string_index];
two_ = two[string_index];
three_ = three[string_index];
four_ = four[string_index];
}
if(note = one_){ // this line is the error
songSound.AddNote(two_, three_); // compare chord s
writeSentence(note2);
four_++;
}
songSound.Play();
}