Input Format
The input is read by the provided locked code template. In the only line of the input there are 3 space-separated strings first_namelast_nameevent. The values of first_name and last_name will be used to create an object p of type Person. The value of event will be used by the provided code to produce the output.
Constraints
  • Each word in the input contains only English letters and is no longer than 15 characters
Output Format
The output should be produced by the provided locked code template. This code will use the implementation of Person public methods and the overloaded << operator to produce the output.

hackerrank overloading ostream operator problem solution in c++ programming

Overloading Ostream Operator problem solution in c++ programming | HackerRank

ostream& operator<<(ostream& os, const Person& p) {
    os << "first_name=" << p.get_first_name() << ",last_name=" << p.get_last_name();
    return os;
}