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 that prompts the user to enter five digit positive numbers. The program then outputs the digits of the number one digit per line. Eg if the user enters 32456, th

In this worksheet you are asked to write three classes in C++: Lecture class, Course class and University class. The classes relate to each other in the way that a Course has many

P o i n t e r d e c l a r a t i o n f o r d a t a m e m b e r : M e t h o d 1 : i n t M : : * p x ; / / T h i s

In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, suc

Problem Description Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new techn

write a program in c language to implement stacks in a single array

Shell sort - C Program: Write a program to define shell sort. void main() {                  //program for sorting by select sort int a[20],i,k,j,n;   clrscr();

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome


Objectives: The objective of this assignment is to use C++ to queue students into an array-based queue for BCS registration. Students have the option of taking five different cours