Possible Duplicate:
Unsigned and signed comparison
unsigned int and signed char comparison
I have a strange behavior when i try to enter in this while statement:
unsigned u = 0;
int i = -2;
while(i < u)
{
// Do something
i++;
}
But it never enters, even if when i set a break point i = -2
and u = 0
.
What am I doing wrong? How could i fix this?