When i develop a destructor, do i require to explicitly call, C/C++ Programming

When I develop a destructor, do I require to explicitly call the destructors for my member objects?

 

 

Posted Date: 3/15/2013 5:41:02 AM | Location : United States





A: yes.

Imagine that List is the name of some class. Function f() declares a local List object called x:

void f()

{

List x; // Local object named x (of class List)

...

}

However function g() declares a function called x() that returns a List:

void g()

{

List x(); // Function named x (that returns a List)

...

}

 

 

 

 

Posted by | Posted Date: 3/15/2013 5:41:20 AM


Related Discussions:- When i develop a destructor, do i require to explicitly call, Assignment Help, Ask Question on When i develop a destructor, do i require to explicitly call, Get Answer, Expert's Help, When i develop a destructor, do i require to explicitly call Discussions

Write discussion on When i develop a destructor, do i require to explicitly call
Your posts are moderated
Related Questions
The digital signal is one which only consists of two states i.e. logic '1'   (+5 volts) and logic '0' (0 volts). Various electronic blocks use logic and these form the basis of a m

Define some features of external storage class in c program? The features of an external storage class variable are as follows: Storage - memory Default initial value -

where to use tower of honoi?

It is a pointer accessible only in the member functions of a struct, class or union type. It points to the object for which the member function is called. Static member functions d


When you are designing a generic class to have or otherwise manage objects of other types, when the format and behavior of those other types are unimportant to their containment or

P r i va t e Member Functions: A private member functions can be called by the members of the same class.  Consider the following example.   c l a ss sample

P o i n t e r d e c l a r a t i o n f o r me m b e r f un c t i o n : M e t h o d 1 : W h e n C l a ss i s n o t

color representation 0,1,2,3,4,5,6,7,.......

What data structure would you mostly likely see in a nonrecursive implementation of a recursive algorithm?Minimum 100 words accepted#