Can one overload the destructor for his class?, C/C++ Programming

Can one overload the destructor for his class?

 

Posted Date: 3/15/2013 5:22:09 AM | Location : United States





A: No.

One can have only one destructor for a class Fred. Always It''s called Fred::~Fred(). It never takes any parameters, and never returns anything.

One can''t pass parameters to the destructor anyway, as you never call a destructor explicitly

(well, almost never).

 

Posted by | Posted Date: 3/15/2013 5:22:42 AM


Related Discussions:- Can one overload the destructor for his class?, Assignment Help, Ask Question on Can one overload the destructor for his class?, Get Answer, Expert's Help, Can one overload the destructor for his class? Discussions

Write discussion on Can one overload the destructor for his class?
Your posts are moderated
Related Questions
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b

In this lab, please complete a given program to perform the following tasks: 1. Allocate a 10 by 5 2D byte array dynamically. The way of allocation must be consistent with pag

is getchar() is a C++ library function?

Syntax rules for writing constructor functions Its name must be similar as that of the class to which it belongs. It is declared with no return type (not even void). Ho

program to find if a no . is prime or not

My file pointer is going to the location which i specified and writing the value but it is in next line so,please help me iam developing in visual studio6

It tells the compiler that a variable or a function exists, even if the compiler hasn't yet seen it in the file presently being compiled. This variable or function may be distinct

If quicksort is so quick, why bother with anything else? If bubble sort is so bad, why even mention it? For that matter, why are there so many sorting algorithms? Your mission (sho

Define Polymorphism? A: Polymorphism let a client to treat distinct objects in the similar way even if they were developed from distinct classes and exhibit different behaviors.

Inheritance is the process of forming new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class,