Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / 05-Practice-29.03.2022 / ex1-Entity.cpp
diff options
context:
space:
mode:
1 files changed, 14 insertions, 0 deletions
-rw-r--r--Year 1/Object-oriented Programming/05-Practice-29.03.2022/ex1-Entity.cpp14
diff --git a/Year 1/Object-oriented Programming/05-Practice-29.03.2022/ex1-Entity.cpp b/Year 1/Object-oriented Programming/05-Practice-29.03.2022/ex1-Entity.cpp
new file mode 100644
index 0000000..0252a13
--- /dev/null
+++ b/Year 1/Object-oriented Programming/05-Practice-29.03.2022/ex1-Entity.cpp
@@ -0,0 +1,14 @@
+#include "ex1-Entity.h"
+#include <iostream>
+
+Entity::Entity() {
+ x = 0;
+ std::cout << "Entity created!";
+}
+Entity::Entity(int xVal) {
+ x = xVal;
+}
+
+Entity::~Entity() {
+ std::cout << "Entity destroyed";
+}