Define order that local objects are destructed?, C/C++ Programming

Define order that local objects are destructed?

 

Posted Date: 3/15/2013 5:20:46 AM | Location : United States





A: In the reverse order of construction: First constructed, last destructed.

In the following instance, b''s destructor will be executed first, and then a''s destructor:

void userCode()

{

Fred a; Fred b;

...

}

 

Posted by | Posted Date: 3/15/2013 5:20:58 AM


Related Discussions:- Define order that local objects are destructed?, Assignment Help, Ask Question on Define order that local objects are destructed?, Get Answer, Expert's Help, Define order that local objects are destructed? Discussions

Write discussion on Define order that local objects are destructed?
Your posts are moderated
Related Questions
one of the applications of computers in numerical analysis is computing the area under a curve. one method of calculating the area under acurve is to divide the area int a number o

Project Description: I want someone to create and install a keylogger on a chrome browser. This could be a relatively simple job, please have experience with this type of work.

E x p r e s sion and their types: An expression will be in form of mathematical expression with C++ syntax embedded with it. Expressions are of following types which m

Public, Private and Protected members: Class members can either be declared in public','protected' or in the 'private' sections of the class. But as one of the features of OOP i

Compiler Design - Limit In The Method Instructions

Binary logical bit-wise operators  There are three logical bit-wise operators :                   &             and                 |              or

what is poiter

C Program for CREATE MATRICES #include stdio.h> #include conio.h> void main() {           int a[10][10],rw=0,clm=0,i=0,j=0;           char s=' ';           c

#question.conversion of tree into binary tree.