Destruction of local object, C/C++ Programming

Need assignment help

What's the order that local objects are destructed?

Posted Date: 2/13/2013 1:26:37 AM | Location : United States





In opposite order of construction: First constructed, last destructed.   

In the following instance, b''s destructor will be executed first, as compared to the a''s destructor: 

example will help you

void userCode()

{

Fred a;

Fred b;

...

}

Posted by Robert | Posted Date: 2/13/2013 1:27:49 AM


Related Discussions:- Destruction of local object, Assignment Help, Ask Question on Destruction of local object, Get Answer, Expert's Help, Destruction of local object Discussions

Write discussion on Destruction of local object
Your posts are moderated
Related Questions
Hi is there any chance to get assignment for fresher tutor

Should my constructors employ "assignment" or "initialization lists"?


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 between two points can b

#include int main() { int T; int N; int i; scanf("%d",&T)

Problem Description 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 sometime

1 PETTERN1 (Pettern1.c)   main() {           int i,j,k=1,a;           clrscr();           for(i=1;i           {                    if(i>=3)

Readers Writers with Processes and Threads Write two programs implementing ``reader pritority readers-writers synchronization'''' on files. One program will use processes, created

example of padovan string program

Generate a class node that contains an integer id, a position (x, y)  and a vector of 0 5,  generate a set of  x nodes each with random connectivity n.    Implement an algorith