syntax rules for writing a destructor function


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.

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: syntax rules for writing a destructor function
Reference No:- TGS0309385

Expected delivery within 24 Hours