I am all the way up to the fourth exercise, Pancake Glutton. Everything works. My program takes input for each of ten gluttons. It outputs the number of pancakes eaten by each. Here's the issue. On the last iteration of the display loop, (making an assumption that it is in the display loop), it adds one to the number of pancakes the last glutton eats.
I am on a Windows Vista Home Premium machine with Code::Blocks 10.05 rev 6283.
Just discovered issue number 2. In testing, to get through all ten data inputs I just entered the number 1 ten times. If I do that, it goes back and starts asking for input starting with glutton #3 again.
The issue occurs, apparently, if I enter the number 1 on glutton #10.
sebgar,
Removing the function resolved both issues. I'm just baffled as to why.
ultifinitus,
I thought that the number in the array declaration was the upper bounds of the index, not the number of objects in the array. I guess it's time for me to read that section of the book again.