Easy way to check if item is in list?
- by befall
Hey guys,
I'm writing a search algorithm in C++, and one of the things I need to do is have a few if statements that check cells above, below, left of, and right of.
Each time a cell is found to be open and added to the stack, I want it added to a list of cells already checked.
I want to be able to say in the if loop if(thisCell is not in checkedCells).
Any simple ideas?
Thanks!