lundi 20 avril 2015

cout exe file contents from char

I saved all the contents from an exe file to char buffer.

When I tried:

string bufferStr=(string)buffer;
cout<<bufferStr.length();

I got that bufferStr is much smaller than buffer, so I thought since i was reading an exe file that somewhere in there I had read an escape character "\0" or something.

How can I use buffer to cout or even write to a file, without buffer escaping any characters? Thanks

Aucun commentaire:

Enregistrer un commentaire