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
Imagine that the server program is a setuid program owned by the root, then after you penetrate the program with a shell running, you become the ROOT and you can remove the whole f

Explain a class to model a banking system. The function members should allow initializing the data members, a query to facilitate for account and a facility to deposit and with

This programming assignment is for use in the LINUX/UNIX environment!! Introduction: System administration often requires custom written programs and tools. One problem a s

A: Use a member while you can and a friend when you need to. Sometimes friends are better syntactically (e.g., in class Fred, friend functions let the Fred parameter to be secon

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. The area under a curve betw

#include #include #include #include #include //*Variables Used in Programs*// int k; int l; int d; int won; int loss; int cash = 500;

write an algorithm that reads a postive integer n and then finds and prints the sum of all integers between 1 and n (inclusive) that are disvisible by 7. please write this using c

superposition of two waves

Given an char variable last that has been initialized to a lowercase letter, write a loop that displays all possible combinations of two letters in the range ''a'' through last. Th

In general, Roman numerals can be converted mathematically by simply assigning a numerical value to each letter, according to the chart below, and calculating a total: M=1000 | D=5