Okay so I have an array with 3 "answers" in it:
CODE
answers[3] = {'y','n',y'};
and I also have an array that has the answers corresponding to certain items:
CODE
Chooser[3][3] = {{'y','y','y'}, {'n','y','y'}, {'y','n',y'}};
And what I want to do is compare the answers array to the chooser array, and when I get three matches in a row (like Chooser[0][1], Chooser[0][2], Chooser[0][3] , not [0][2],[0][3],[1][0]) I will have a function or statement that says "You have chosen: " and I'll assign a name to it.
This is kinda like an expert system so thats how its going to work, my problem comes in comparing the two arrays because i keep getting array indicies that are not in a row.
here is my code for comparing:
CODE
for(int i =0; i<3; i++)
for(int j=0; j<3;j++)
{
if(Chooser[i][j] == answers[i])
{
cout << "They match at: Chooser[" << i << "][" << j << "] and answers[" << i << "]" <<endl;
continue;
}
else
break;
}
and as output I get
CODE
Chooser[0][0] and answers [0]
Chooser[0][1] and answers [0]
Chooser[0][2] and answers [0]
Chooser[1][0] and answers [1]
Chooser[2][0] and answers [2]
Any ideas why?