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
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0

Bitwise Operations 1. Write a function that has an int parameter n, makes an integer mask having the bit 1 at the nth place from the rightmost bit, and returns the mask. For ex

Sir i want to know all the basic knowledge of turbo c.

Overloading Binary Operators class SI {float i,p,n,r,a; public: SI(){}; SI(int gp,int gn, int gr); void putdata(void); SI operator+(SI); }; SI SI::opera


The ability to verify at run time the type of an object by using the typed operator or the dynamic_cast operator.

#queComputers are frequently used in check-writing systems, such as payroll and accounts payable applications. Many stories circulate regarding weekly pay- checks being printed (by

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t

Described multiple inheritance(virtual inheritance)? And explain its advantages and disadvantages? A: It is the procedure in which a child can be derived from more than one pare

write a C rpogram that can display the transpose form of a ciphertext matrix.Prompt users to provide row and coloumn number of matrix.Then user will input plaintext and the program