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:
Commita6fb61db10a93801065d34d19fb6d7166511e58d (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-03-31 09:37:42 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-03-31 09:37:42 +0300
Filesec3db1d6147713c184c9ba23fd9dd866c599edcc /Year 1/Object-oriented Programming/Solutions Sem. 03/ex4/source.cpp
uni-projects-a6fb61db10a93801065d34d19fb6d7166511e58d.tar
uni-projects-a6fb61db10a93801065d34d19fb6d7166511e58d.tar.gz
uni-projects-a6fb61db10a93801065d34d19fb6d7166511e58d.zip
Parent4a530b9ae9f50ce0e117931933db3a11285f29af (diff)
Made naming and slight formatting adjustments
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();
}