Monday, April 30, 2012

Bitwise shifting array of char's

I've got an array of char's that I'm trying to bitwise shift right, then "&" with another array. I think I've got the wrong idea of how to do this. I thought, even though it was an array of char's just stating "my_array >>= 1" would shift everything but I'm getting a: "error: invalid operands to binary >> (have 'char[8]' and 'int')"

The bitwise comparision I'm trying to do is with a similar size array initiated to all "0's"...for that I'm getting: "error: invalid operands to binary & (have 'char *' and 'char *')" Do I need to convert these array's into something else before I can shift and compare?





No comments:

Post a Comment