Jaganath and his Juniours

#include <iostream>
using namespace std;

class Point{
  int px;
public:
  Point(int px){
    this->px = px;
  }
 
  void show(){
    cout << px << endl;
  }

  friend void operator++(Point &);
};

void operator++(Point &p){
   p.px++;
}

int main() {
  int px;
  cin >> px;
  Point ob1(px);
  ++ob1;
  ob1.show();
return 0;
}

1 comment:

  1. add district sports meet, friends in maths tuition, jadeja and googly, shape and measurements, supermarket, multiples, numbers

    ReplyDelete