I just started on C++, and because I have a long history with another (much simpler), but I can still use my knowledge from it. I am currently stuck with a problem. Apparently I can't get information that is stored in an Array, when I try and recall it from within a loop within a loop. This is the code:
The Player string array is for storing data about the player
The chaNam string is to store data about the different classes
The "ia" and "i" was just guessing and trying to remove it. I though it was a bug, but it was the other thing you suggested that was the problem.
I know now that I misunderstood the information required for the function to work. When "i" is equal or lower than 3, it will work. If not, then it won't, is that correct?
<= is lower than or equal to. >= is greater than or equal to.
When your loop first starts, ia is set to 0 and incremented each loop. However, your condition >= 3 would be false at the start resulting in no loop :)
I guess it is not a problem as you said "loop in a loop". So far as I see, outer loop is no problem.
The most significant mistake is the condition in the inner loop.
since 1<3, the condition will never be satified, and the inner loop will never be excuted.