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
THIS PROGRAM IS TO ADD TWO DISTANCES & SHOW THEIR SUM AS NEW DISTANCE # include # include typedef int dist; struct distance   {   dist inch;   dist feet;   }; distance add

The break statement The break statement, which was already covered in the switch.. case, can also be used in the loops. When a loop statement is encountered in the loops the co

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

Incomplete types refer to pointers in which there is no availability of the execution of the referenced location or it points to some location whose value is not available for modi

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

C Program for MAXIMUM NO, MINIMUM NO AND SORTING   void main() {           int i,j,t;           int a[5];           clrscr();           for(i=0;i

We have used logic symbols in the past, but not really though about the actual real devices. Semiconductor companies have taken the logic symbols are manufactured them into logic f


5 questions. plus i will provide the "vector.h" for the questions that needs it

Deliverables: you are required to upload your c code in the assignment dropbox set in Moodle. You are supposed to work with Linux gcc compiler and pico editor for compiling via the