0

What does this sign(~) mean?

I am at the "More On Classes" step "Separate Files for Classes" I follow the instructions in "Creating a new class" and instead of having this in MyClass.cpp: #include "MyClass.h" MyClass::MyClass() { //ctor } I have this: #include "MyClass.h" MyClass::MyClass() { //ctor } MyClass::~MyClass() { //dtor } I cannot figure out why and what does the sign (~) mean? Sincerely

25th Aug 2020, 7:49 PM
Denis Sokan Poussard
Denis Sokan Poussard - avatar
3 Answers
+ 4
To distinguish btw constructor and destructor .
25th Aug 2020, 7:54 PM
HBhZ_C
HBhZ_C - avatar
+ 1
Give a read to destructors.
25th Aug 2020, 7:54 PM
Hima
Hima - avatar