Trying to get my Or operator to work and i guess it just isn't.
If case = 0, i want it to check the forward array in a 2d array and only procede if there isn't a 1,2 or 3 int in the element.Code:switch (rdm)
{
case 0: // Go Forward
{ if (Grid[++x][y] != 1||2||3)
{
Grid[x][y] = Output[j];
Pop[index][j] = 1;
cout << "Forward Picked" << endl;
}
else
{
Grid[--x][y];
cout << "Error" << endl;
}
}
break;
Can i use an Or operator in the If statement like that?
Thanks
Regards Wolfe