Hi Thales, > I'm trying to open a binary file and print it to the stdout, but substituting '\n' for "\r\n", the file generated is corrupted. Have you tried opening the file in binary mode? #include <fstream> std::fstream f("myfile.bin", ios_base::binary | ios_base::in | ios_base::out); HTH, --Eljay