Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / 06-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/06-Practice-29.03.2022/ex1/Entity.cpp14
diff --git a/Year 1/Object-oriented Programming/06-Practice-29.03.2022/ex1/Entity.cpp b/Year 1/Object-oriented Programming/06-Practice-29.03.2022/ex1/Entity.cpp
new file mode 100644
index 0000000..a4ad52e
--- /dev/null
+++ b/Year 1/Object-oriented Programming/06-Practice-29.03.2022/ex1/Entity.cpp
@@ -0,0 +1,14 @@
+#include "Entity.h"
+#include <iostream>
+
+Entity::Entity() {
+ x = 0;
+ std::cout << "Entity created!";
+}
+Entity::Entity(int xVal) {
+ x = xVal;
+}
+
+Entity::~Entity() {
+ std::cout << "Entity destroyed";
+}