istream c 2b 2b

Solutions on MaxInterview for istream c 2b 2b by the best coders in the world

showing results for - "istream c 2b 2b"
Lyam
23 Oct 2018
1//These functions can access the private data of the class that declared them to be friends!
2	 std::istream& operator>>(std::istream& ist, Book& b){
3		 ist >> b.price >> b.title >> b.author;
4		 return ist;
5	 }
6	 std::ostream& operator<<(std::ostream& ostr, const Book& b){
7		 ostr << "Title: " << b.title << "   Autor: " << b.author << "   Price: "<< b.price ; 
8		 return ostr;
9	 }