(c++) Read .dat file as hex using ifstream
This is my first post so sorry if I break any unwritten rules. :P I am a beginner/intermediate programmer and I need help with this program. I am trying to infile/read/ifstream (whatever) a .dat file as HEX into one big string. I don't want to read it as text. I want the hex format so I can search through the string and make changes to it. (Like an automatic hex editor) ex. my file "00000000.dat" is ~7kb in size. In hex editor, the hex look like this: 0A 00 00 0A 00 05 4C 65 76 65 6C 07 00 06 42 6C 6F 63 6B 73 00 00 80 00 07 FF 39 01 FF 03 03 02 FF 3F 00 07 FF 39 01 FF 03 03 02 FF 3F 00 07 FF