I'm currently writing a simple program to convert a string into base64 by manipulating its bit values.
If I use the bitset function to convert a string into its bit values, how can I manipulate or store those values?
For example, if I do this:
std::cout << bitset<8>(cstring[i]) << std::endl;
I'm able to print out all the binary values I want. But I want to be able to manipulate these values. Do I have to convert into a string before I can operate on it, or can I operate on the bits directly.
More specifically I'd like to group the bits into groups of size 6 and change the value of those groups into an int value. Any help is appreciated, thanks!