You are viewing a single comment's thread. Return to all comments →
Shouldn't the overloaded << operator function be declared as a friend of class Person, so that it can access the private data within a Person object?
Seems like cookies are disabled on this browser, please enable them to open this website
Overloading Ostream Operator
You are viewing a single comment's thread. Return to all comments →
Shouldn't the overloaded << operator function be declared as a friend of class Person, so that it can access the private data within a Person object?