I often see classes such as the following with istream, outstream etc. I was just wondering what they are used for and how i could use them. It has something to do with serialization right?
I imagine print would print the object and write would be changing the data members but What would read be used for and why do they return a stream??
Code:class Book:public PublishedItem { public: Book(void); string GetAuthor(); string getBookTypeAsString(); string getTypeName(); istream&read(istream&in); ostream&write(ostream&out); ostream&print(ostream&out) const; private: string author; enum bookType{Fiction, NonFiction}; };



LinkBack URL
About LinkBacks


