Re: Need help with my program

From: Ed Morton (mortonAVOIDINGSPAM_at_Lucent.com)
Date: 10/16/03


Date: Thu, 16 Oct 2003 15:20:52 -0500


On 10/16/2003 3:18 PM, Not Really Me wrote:
> "Joona I Palaste" <palaste@cc.helsinki.fi> wrote in message
> news:bmmn46$rj3$1@oravannahka.helsinki.fi...
>
>>DarkKobold <none@thanks.com> scribbled the following
>>on comp.lang.c:
>
>
> <snip>
>
>>> for (i = 0; i<= 7; i++)
>>> {
>>> if ((buffer[curr] & y) == y)
>>> // ^^ this line is the main problem I think.
>>
>
> <snip>
>
>>> y << 1;
>>
>
> Also, it appears that y is uninitialized when it is first used. It needs to
> have a value before you use it the first time. You can't assume that it
> starts at zero.

Yes you can, it's static. See http://www.eskimo.com/~scs/C-faq/q1.30.html.

        Ed.