Syntax rules for writing a destructor function
- Its name is the similar as that of the class to which it belongs, except that the first character of the name is the symbol tilde ( ~ ).
- It is declared with no return type ( not even void ) since it cannot ever return a value.
- It cannot be static, const or volatile.
- It takes no input arguments , and thus cannot be overloaded.
- It should have public access in class declaration.