QUOTE(oat @ 13 Mar, 2007 - 06:22 PM)

CODE
// Car.cpp : Defines the entry point for the console application.
// Michael Otis - DMACC C++
// Chapter 8 - Exercise 8
int main()
{
Car aCar[5];
system("Pause");
}
In the code above you are creating array of 5 car objects so the constructor for class car gets called successively 5 times.
and after pause the program finishes where scope of all 5 objects also finishes so all are destroyed successively, that's why you see that kind of output there.
if you want to see some kind of output where there is a mix of creation and destruction of objects then you can do this.
* create one object of car object in main.
* then call some function from main and create a car object inside it [if you want print it also

]
* then have some internal block [maybe a for loop or something] where you create objects inside it. [the declaration and definition both should be inside].
* create one more instance of a car in main at the end.
* pause.
this will create good mixture of creation and destruction of objects.
Hope this will help you.
else....
We will meet here again.