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 }