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
How must runtime errors be handled in C++ - Runtime errors in C++ can be handled using exceptions. - This exception handling mechanism in C++ is developed to handle errors i

A: In C++, the definition of NULL is 0, thus there is only an aesthetic difference. I prefer to ignore macros, so I employ 0. Another difficulty with NULL is that people sometimes

Prepare data from fixed OCR areas scanned. Project Description: Project is to design software which can use character recognition only on certain areas of scanned pdf's/ jpeg

Pupils' heights The health visitor at a school is going to measure the heights of all pupils. For each class she makes a statistics giving the number of pupils of each height and

Write a program to determine V c for a given value of time (t)   #include stdio.h #include math.h void main() {      char prompt;   float vs,cr,t,vc;   /* input time */

TO CONVERT A NUMBER OR A DIGIT INTO ALPHABET

Write a program that keeps record of football results. Program stores following information about each match: Description Type and/or size name of home team max. 25 characters name

Write a Program that illustrate creation of a data file? Here is a program to generate a Fibonacci series and write it into a Data file. # include main() { FILE *fpt;

push and pop operation using array draw flowcharts

#write code for rotation in c