I have bitset<8> v8
and its value is something like "11001101", something in binary, how can we convert it to an array of characters or integers in c++?
is it possible to convert bitset<8> to an array of characters of integers?
7.2k Views Asked by bijlikamasla At
2
To convert to an array of char, you could use the
bitset::to_string()
function to obtain the string representation and then copy individual characters from that string: