#include "HexEditor.h" void createFile() { int x = 1816466293; std::ofstream file("myData.dat", std::ios::binary); file.write( (const char*)&x, sizeof(x)); } int main() { createFile(); HexEditor hexEdit("myData.dat"); hexEdit.viewFile(); hexEdit.change(1, "68"); // 68x0 h (value in hex) hexEdit.change(2, 68); // 68 D (value in decimal) hexEdit.viewFile(); hexEdit.remove(); hexEdit.viewFile(); hexEdit.save(); HexEditor hexEditCopy("myData.dat"); hexEdit.add(46); // 46 . (value in decimal) hexEdit.add("15"); // 15x0 (value in hex) hexEdit.change(0, "4B"); // 4Bx0 K (value in hex) hexEditCopy.viewFile(); hexEdit.viewFile(); }