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
Aim: To implement a program for dynamic data structure(linked list). Code:                       class node {             int data;             node *next;

Cross Platform Clinet app for a vpn Project Description: We want a cross platform client app for VPN. The app must have the subsequent options below: 1. Must be an open

A: No. (Excluding if you have an old compiler, you might have to force the new operator to throw an exception if it runs out of memory.) This turns out to be a real pain to alwa



brief note on multiple stack

padovan string for a natural number is defined

This task involves creating a new class(es) that will allow the system to playback pattern sequences using the Neo  Freerunner  hardware. The first thing to note is that the vibrat

the program that solve the efficiency of otto cycle

(a) Write a procedure (count-even n) that counts the number of even digits in the decimal representation of the number n. For example, (count-even 234) should return 2. (b) Writ