Because you are still trying to access invalid array indices.
You use the variable diceTotal as an index into the array, but you arlready said it yourself:
But if 10 is the last entry in your...
Type: Posts; User: Cornix
Because you are still trying to access invalid array indices.
You use the variable diceTotal as an index into the array, but you arlready said it yourself:
But if 10 is the last entry in your...
If the first one is 0 and the last one is 11 you got 12 elements, but you want to store 11 elements.
So the first position is 0 and the last position is 10. (thats an array of size 11)
If you are...
Look at these 2 lines and think very carefully:
int diceTotal = dieOne+dieTwo;
tally[diceTotal]++;
What values can diceTotal have? What is possible and impossible?
How many elements are you...