![]() |
|
#1
|
||||
|
||||
private copy and assignment operatorCan anyone tell me the practical reason why istream, ostream and iostream classes have made there objects uncopyable by making copy constructors and assignment operator private.
Or in general cases when would we don't want to allow users to copy. __________________
Gravitation is not responsible for people falling in love. -Albert Einstein |
|
#2
|
||||
|
||||
Re: private copy and assignment operatorcan anyone please look into this
__________________
Gravitation is not responsible for people falling in love. -Albert Einstein |
|
#3
|
|||
|
|||
Re: private copy and assignment operatorIt's your job to "look into" this. Our job is to answer if we know it, not do research for you.
Please refer to Guideline #7... __________________
Please read http://www.gidforums.com/t-5566.html. They were written to help you create a request that is readable and has enough information we can actually tell what you need help with. |
|
#4
|
|||
|
|||
Re: private copy and assignment operatorwell the iostream objects refer to hardware resources, such as the screen or files on the disk. if two objects referred to the same resource, race conditions could easily be created. This is just my guess of what is going on, but it sounds plausible (to me). Someone feel free to correct me if I'm wrong.
|
|
#5
|
||||
|
||||
Re: private copy and assignment operatorQuote:
__________________
Gravitation is not responsible for people falling in love. -Albert Einstein |
Recent GIDBlog
Developing GUIs with wxPython (Part 3) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Circular Linked Queue Copy Constructor and Assignment Operator Not Working? | wc3promet | C++ Forum | 1 | 06-Oct-2008 03:00 |
| Need of assignment operator in case of copy constructor | alcoholic | C++ Forum | 2 | 01-Jan-2006 06:15 |
| Pointer Usage in C++: Beginner to Advanced | varunhome | C++ Forum | 0 | 19-Aug-2005 09:25 |
| template comiling problems - need expert debugger! | crq | C++ Forum | 1 | 01-Feb-2005 21:26 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The