Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Solutions Sem. 03 / ex4 / source.cpp
diff options
context:
space:
mode:
1 files changed, 15 insertions, 15 deletions
-rw-r--r--Year 1/Object-oriented Programming/Solutions Sem. 03/ex4/source.cpp30
diff --git a/Year 1/Object-oriented Programming/Solutions Sem. 03/ex4/source.cpp b/Year 1/Object-oriented Programming/Solutions Sem. 03/ex4/source.cpp
index 90baaee..60ea3e2 100644
--- a/Year 1/Object-oriented Programming/Solutions Sem. 03/ex4/source.cpp
+++ b/Year 1/Object-oriented Programming/Solutions Sem. 03/ex4/source.cpp
@@ -1,4 +1,4 @@
-#include "File.h"
+#include "HexEditor.h"
void createFile() {
int x = 1816466293;
@@ -9,21 +9,21 @@ void createFile() {
int main() {
createFile();
- File myFile("myData.dat");
- myFile.viewFile();
- myFile.change(1, "68"); // 68x0 h (value in hex)
- myFile.change(2, 68); // 68 D (value in decimal)
- myFile.viewFile();
- myFile.remove();
- myFile.viewFile();
- myFile.save();
+ 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();
- File myFileCopy("myData.dat");
+ HexEditor hexEditCopy("myData.dat");
- myFile.add(46); // 46 . (value in decimal)
- myFile.add("15"); // 15x0 (value in hex)
- myFile.change(0, "4B"); // 4Bx0 K (value in hex)
+ hexEdit.add(46); // 46 . (value in decimal)
+ hexEdit.add("15"); // 15x0 (value in hex)
+ hexEdit.change(0, "4B"); // 4Bx0 K (value in hex)
- myFileCopy.viewFile();
- myFile.viewFile();
+ hexEditCopy.viewFile();
+ hexEdit.viewFile();
}