Website Summary Files Commits Branches @commit @diff @stats
path: root / week11 / Exercise02
diff options
context:
space:
mode:
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() {};
};