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

Question 1: (a) Describe the following objects and condition states: (i) ifstream and ofstream objects (ii) eof(), fail(), bad() and good() functions. (b) Write a C++ pr


Webcam Driver static library or DLL required for Windows I want a .dll or .lib file using which i will take a snapshot from the webcam and it can't turn on the webcam LED while

#write code for rotation in c

Project Overview A certain financial institution (bank) wishes to promote its new business products/services by conducting road shows in rural areas. Their aim is to encourage peop

Question Write a program using c++ for the above function , at a= 1000, b=10 -3 ,10 -2 ,10 -4

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

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 .

Operation Files 2.1. Your program should open and read the file specified by the first command line argument of the program. 2.2. The first line of the file contains an integer