What you've shown is partly C and partly C++.
You haven't shown declarations for your classes.
can I write bit by bit to the hard drive
No. You can write byte by byte, but not bit by bit.
PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.
the actual code is way to long. vs2017 change the string *bin command i use to concat the the string "11", "10" and "01" in to a ascii 32 char string then i convert to a 32 a 32 bit integer number and print it
sorry i meant just a string "110111101110011010110111011001" of 31 char
I then convert this string to integer 32 and write the result to disk. This way the value on the
will be the same for read in of my other program.
I just need a efficient way. Maybe not a string and feed to buffer
I know what i have to do i have to set the bit of a integer value
how do i walk the bits to match the above