#include using namespace std ; class point { public: int x1 ; int y1 ; point operator+( const point& param1 ); point operator+( int param1 ); }; point point::operator+( const point& param1 ) { cout << "Calling operator + member function." << endl ; point pointObj ; pointObj.x1 = x1 + param1.x1 ; pointObj.y1 = y1 + param1.y1 ; return pointObj ; } point point::operator+( int param1 ) { cout << "Calling operator + member function with an integer argument." << endl ; point pointObj ; pointObj.x1 = x1 + param1 ; pointObj.y1 = y1 + param1 ; return pointObj ; } int main() { point point1 ; point1.x1 = 1 ; point1.y1 = 1 ; point point2 ; point2.x1 = 2 ; point2.y1 = 2 ; point point3 ; point3 = point1 + point2 ; cout << point3.x1 << " " << point3.y1 << endl ; point3 = point1 + 5 ; cout << point3.x1 << " " << point3.y1 << endl ; return 0 ; }