fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Nod {
  5. int val, poz;
  6. bool operator > (const Nod& other) {
  7. return val > other.val;
  8. }
  9. };
  10. int main() {
  11. // your code goes here
  12. Nod A, B;
  13. A.val = 2; B.val = 1;
  14. if (A > B) {
  15. cout << "A mai mare decat B";
  16. }
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
A mai mare decat B