Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ostream& operator<<(ostream& os, const User& toPrint)
- {
- if (typeid(os) == typeid(ofstream)) // file
- {
- //print something
- }
- else //output (ostream)
- {
- os << "Name: " << toPrint.userName << endl
- << "Password: " << toPrint.password << endl
- << toPrint.address;
- toPrint.toPrint(os);
- }
- return os;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement