First of all no one is fed up of anything, if i wanted i would just stop posting.
People helped me here, so I'm helping others if i can here..
anyhow, it's just like i said..
1 2 3 4 5
|
cout << "Which note would you like the scale to start on? (60 = Middle C)" << endl;
cin >> MajStartingNote;
//Assign Array Values
MajorIntervalAscend[0] = MajStartingNote ;
|
this is from your code in the URL you gave me.
notice how "majorintervalascend[0] can without problem be worth 60.(middle c), let's assume we picked 60.
Now let's look at the loop..
1 2 3 4 5 6 7 8 9 10 11 12
|
int play = 0;
while(play <= TimesPlayed)
{
for(int i = MajorIntervalAscend[0]; i<= 7; i++) // we're saying that i=60 here
{
sendMidiMessage(0x90, MajorIntervalAscend[i], 0x7f); //array[60] doesn't exist.
delay(userDelay);
sendMidiMessage(0x80, MajorIntervalAscend[i], 0x7f);//array[60] doesn't exist.
}
play++;
}
|
as i said, you cannot have your counter be worth the actual VALUE inside the array. If i want to have an "age" array, with a counter i, doing i=age[0] will only mean that i is worth what ever is placed in the first position of the array. could be ANY number i want, and most likely will not be 0.
If this doesn't answer your question, then please define your question specificly.
For your original question of why the compiler said you didn't initialize i although you did, i have no answer, but it probably has something to do with the mistakes in syntax in your code.
as usual, hope this helps.