my code is having a bug here and i don't know how to fix it, so if you could please help me that'd be great.
Here's my code:
unsigned reverse(unsigned value)
{
unsigned res;
int l_mask, r_mask;
l_mask = 0x00000002, r_mask = 0x40000000;
for(res = 0; r_mask != 0x00000001; r_mask >>=1, l_mask <<= 1)
l_mask & value == 0 ? res &= ~r_mask : res |= r_mask;
return res;
}
The error is:
lvalue required as left operand of assignment
I've seen another posts and questions but nothing seems to be related to the problem that I'm having.
If anyone could help me I would be very appreciated