Website Summary Files Commits Branches @commit @diff @stats
path: root / week11 / Exercise02
diff options
context:
space:
mode:
Commit66a5cdf79a8324019d9d34055ad212ad52504e3c (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-05-10 11:33:35 +0300
Committer
 Syndamia <kamen@syndamia.com>
2024-05-10 11:33:35 +0300
Files309d7d6acc99ef6de8cff5ad18e2533572bc348f /week11/Exercise02
oop-2023-solutions-66a5cdf79a8324019d9d34055ad212ad52504e3c.tar
oop-2023-solutions-66a5cdf79a8324019d9d34055ad212ad52504e3c.tar.gz
oop-2023-solutions-66a5cdf79a8324019d9d34055ad212ad52504e3c.zip
Parent7b19cabee8b08478f31f6e4594ed28e1d04e153c (diff)
[w11] Fixes for destructors
1 files changed, 5 insertions, 0 deletions
-rw-r--r--week11/Exercise02/Employee.h5
diff --git a/week11/Exercise02/Employee.h b/week11/Exercise02/Employee.h
index 7be3574..086f65d 100644
--- a/week11/Exercise02/Employee.h
+++ b/week11/Exercise02/Employee.h
@@ -7,4 +7,9 @@ protected:
char name[512];
char position[128];
char department[64];
+
+public:
+ // Може да имаме полиморфизъм, затова се нуждаем от виртуален деструктор
+ // В бъдеще ще използваме = default вместо {}
+ virtual ~Employee() {};
};