-
June 9th, 2010, 10:32 AM
#1
Why copy constructor of ostream class is private?
Why copy constructor of ostream class is private?
-
June 9th, 2010, 10:37 AM
#2
Re: Why copy constructor of ostream class is private?
Because it wouldn't make much sense to copy an ostream. Let's say you do. Now, how are writes to the two copies of the stream supposed to resolve themselves? They'd be constantly overwriting each other.
-
July 5th, 2010, 07:26 AM
#3
Re: Why copy constructor of ostream class is private?
Can someone more light on this?
-
July 5th, 2010, 07:55 AM
#4
Re: Why copy constructor of ostream class is private?
It is made private so you can't copy it.
As Lindley said, there is no sense in having two ostreams.
What use would there be in having two items doing the same job ?
How would they sort out which is supposed to be doing the work at any particular time ?
your humble savant
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|