>2) ok, but we don't want to modify any data mambers of the dirived class?
Why would you want to modify an object with an output function?
>By theway, only the ostream object "cout" is connected to the screen, right?
C++ doesn't require a screen, cout is simply connected to the standard output. But to answer your question, yes. At program startup, the only ostream object connected to standard output is cout.
>Huh? why?
Because the standard says so. :p
>when do these copy objects give their memory back to the system?
When the scope in which they were created is exited:
Code:object foo();
int
main()
{
object a = foo();
for (int i = 0; i < 10; i++) {
object b = foo();
cout<< b <<endl;
} // b is destroyed here
} // a is destroted here