Advertisement
MARSHAL327

Untitled

Jan 12th, 2020
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class MyInt
  5. {
  6.     int i, j;
  7. public:
  8.     MyInt() {
  9.         cin >> i >> j;
  10.     }
  11.     void print_i_j() {
  12.         cout << i << endl;
  13.         cout << j << endl;
  14.     }
  15.  
  16.     void operator ++ (int)
  17.     {
  18.         if (this->i == this->j)
  19.             cout << "yes";
  20.         else
  21.             cout << "no";
  22.     }
  23. };
  24.  
  25.  
  26. int main()
  27. {
  28.     MyInt I;
  29.     cout << "================" << endl;
  30.     I++;
  31.  
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement