overloading of operator in c++ code example
Example 1: operator overloading in c++ <<
ostream &operator<<(ostream &output, const MyClass &myObject)
{
output << "P : " << myObject.property;
return output;
}
Example 2: overload the >> operator in c++
istream &operator>>( istream &input, Class_Name &c )