M
marydeepthy
Hi,
In my function, I receive a value as unsigned int, and i need to check
if it is greater than a limit.
say for example,
limit = 1000;
the checking is performed like this:
if(limit< inputValue)
{
//Do this
}
In all cases this works fine, except FFFF FFFF. In this case,
limit<inputValue returns TRUE, instead of FALSE.
Is this due to overflow..what can i do for this. will a type casting
help?
In my function, I receive a value as unsigned int, and i need to check
if it is greater than a limit.
say for example,
limit = 1000;
the checking is performed like this:
if(limit< inputValue)
{
//Do this
}
In all cases this works fine, except FFFF FFFF. In this case,
limit<inputValue returns TRUE, instead of FALSE.
Is this due to overflow..what can i do for this. will a type casting
help?