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
It is a feature in C++ to reduce name collisions in the global name space. This namespace keyword assigns a separate name to a library that allows other libraries to use the simila

Add words in Dictionary: void Dictionary::add( Object& objectToAdd ) {     if( !objectToAdd.isAssociation() )         ClassLib_error( __ENOTASSOC );     else


Write a program that takes 3 small letters as input and sort them according to their ASCII value.


Project Description: I have software written with VB that i helped design, but now the original author died,(Neil Tromp), and the software ended up in the hands of someone else!

Reference Types The symbol "&" is interpreted as an address operator as well as AND operator. This operator is also used to declare a "reference variable". A reference is refer

Program1: Write a program to find the factorial of a given number. The input is user given. Final output is printed out on to the screen. Program2: Write a program to gene

Define the Logical Operators in c language? The Logical operators deals with the ways the relationships are able to connected. C has the following three logical operators

v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0