I have an array of ints that I need to extract bits from. More specifically, I need to get the high half and the low half of bits of the entire int array.
For example, if I have an array of 9 ints (each one 32 bits), I need to store the first and last 144 bits. I'm likely going to store them as strings.
One way might be to convert them to strings via a bitset (as below).
For an array of ints, just add the strings of bits corresponding to each. Then use the string class's substr() function to grab the first or second half.