Hi,
I need help with concatenating several bits values to one big value.
For example:
lets say I have these char variables which I want to concatenate to one value.
unsigned char x = 0x02; //00000010
unsigned char y = 0x01; //00000001
unsigned char z = 0x03; //00000011
and the output should be,e.g. 000000100000000100000011
Bit-wise operators can be hard to debug and read when problem crept up. Thanks for stereoMatching post, now I know there is a std::bitset class I can use directly and this is a God given gift to C/C++ programmers again!!!