while ((x<y) && ((red[0][x] != target) &&( red[1][x] != target) && (red[2][x] != target) && (red[3][x] != target) && (red[4][x] != target) && (red[5][x] != target) && (red[6][x]!= target) && (red[7][x]!= target) && (red[8][x] != target) && (red[9][x] != target))){ x++;
The problem is red is a variable and i need to check all the values in the red row. i dont know red will have 10 vaules.
any ideas? As im in a while loop i cant use a for loop here. x increases each time to check the columns, which works fine.