Re: Integer subtraction problem, help!



Eric,
Thanks a lot! I solved the problem but I still have a question.
>For example, `ffffffff' is *not* -1; it is (if there's a `0x' at the
beginning)
> 4294967295.

The problem was this:
As mentioned before, I was getting the value of 'a' from a #define. (c
and b are ok since they are got from input and are signed numbers)

#define a 0x80000000
assigned not -2147483648 but some other big positive value to 'a'.

Now, I removed the #define and put this as a statement inside my
function and it works.

But lint gives a warning saying that "initializer is out of range:
0x80000000"

How can I fix it?

Thanks
Bruce

.



Relevant Pages


Loading