I want to read in a file binary (manipulate it) and write it back to a file. In other words I would like to copy a file.
I thought this code should do it but I tried to copy a 1.11KB big file and the result file was just 1KB. Why? And is this an efficient way to read and write or is there a quicker possibility?
unsigned long file_size = in.tellg();
buffer = new char [file_size];
Later I need to read the file bytewise so I would do it with
is this fast or is in.get() faster...?
Thanks in advance.