I am doing the tutorial from this website, and I did the part of classes, but there is one thing that I don't understand: what is the use of constructors and deconstructors? Could anyone explain that?
Thanks in advance!
You can use constructors to set the state of your object. Depending on the situation in your program, you may need one of a dozen different states. So you can overload constructors to allow this to happen.
tl;dr
Constructors are used to initialize members, while destructors are used typically to free up dynamically allocated memory.