Thanks!
Last night, I figured this out too. I might be good to add this note to the header although it is kind of logical.
I’m rather new to C++ so I have to figure out some of these things.
For future readers, replace the two lines:
outfb.open(streamedFile, std::ios::out);
outfb.open(streamedFile, std::ios::in);

by:
outfb.open(streamedFile, std::ios::binary | std::ios::out);
outfb.open(streamedFile, std::ios::binary | std::ios::in);

and it works.
A file is opened in text mode by default and then, on windows, everytime a byte passes which corresponds to the ‘\n’ character, it is replaced by two bytes ‘\r\n’ causing a sort of corrupt file.
How do I close this topic? Or somebody can close it for me.