How to set bit values which are not divided on byte boundary

Posted by changed on Stack Overflow See other posts from Stack Overflow or by changed
Published on 2010-03-15T20:34:29Z Indexed on 2010/03/15 20:49 UTC
Read the original article Hit count: 149

Filed under:
|
|

Hi

I have a header field of 2 bytes where first four bits are packet type and other 12 bits are for length. but i don't know how to store this values and retrieve them.

I am using ms c++ for client and java for server. It is the client which has to set this values and server has to retrieve it.

Thanks

© Stack Overflow or respective owner

Related posts about c++

Related posts about java