check if character is NOT in string

hello all. im making a sudoku solver.. my problem is that when it checks row, column and region for numbers, it seems to find the number that is present in all three rather than NOT present. here the code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
if(!rows[curRow].find(num))
			{
				if(!columns[curColumn].find(num))
				{
					if(!regions[curRegion].find(num))
					{
						oss << num;
					}
				}
			}
		}

		possible[box] = oss.str();
		oss.str("");


im going to leave evrything else out bc everything else is working perfectly and ik this is the problem.. why is looking for the num instead of looking to see if its NOT there??
What's the implementation of find()?
If rows[curRow] is a std::string, and num is a char

if( rows[curRow].find(num) == std::string::npos ) // if num is not in rows[curRow]
thank you very much.. it was starting to frustrate me especially when it claimed it found a number that wasnt even there... >.< lol the help is appreciated!
Topic archived. No new replies allowed.