bool problem

1
2
3
4
5
6
7
8
9
void getMinutes (int& minutes, string s)
{
	bool result;
	do {
		cout << s;
		cin >> minutes;
		result = isValidMinutes(minutes);
	} while (result == minutes);
}

warning C4805: '==' : unsafe mix of type 'bool' and type 'int' in operation.

Thats the error message i keep getting. iv been reading and reading and i just dont get it.Can someone please help me or lead me in the right direction.i really want to understand bool
Well you are comparing a boolean (result) with an integer (minutes). That is legal but it often leads to unexpected behavior and is a bit risky. What else is there to it?
Maybe you meant }while (result);?
^^ thats it! thnx everything works now, thnx both of u!
Topic archived. No new replies allowed.