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 c language program that shows stack overflow..

Program to convert fraction to decimal: int main() {                 float num, denom;     // numerator and denominator of fraction                 float value;

processing two jobs through 2 machine

# include stdio.h> # include conio.h> # include string.h> void main()   {           int i=0,j=0;           char a[100],temp;           clrscr();

Stack operations - C++: Write a program to define basic stack operations in c++. int Stack::push(int elem) {    int m = getmax();    if (top    {       put_

Draw a circle in c program: void main() { clrscr(); int i,r=50,t,j,x,y; int gd,gm; gd =DETECT; initgraph(&gd,&gm,""); for(x=50;x for(y=50;y {   i

Goal: Design a program that computes square matrix multiplication on GPU using CUDA. Write the code in C. In particular, your implementation should obey the following requiremen

A: this is a procedure during exception handling while the destructor is called for all local objects in the stack among the place where the exception was thrown & where this is ca

Member Functions of a Class A member function of the class is similar as an ordinary function. Its declaration in a class template must explain its return value as well as the

I have a assignment deadline is 11.11.2015 can I get help