Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

Medeali's blog

By Medeali, history, 2 years ago, In English

i am trying to sort an array of structs but i am getting compiling error this is my code https://ideone.com/mQPPxI could someone help me solve the issue please

  • Vote: I like it
  • -4
  • Vote: I do not like it

| Write comment?
»
2 years ago, hide # |
 
Vote: I like it -8 Vote: I do not like it

Auto comment: topic has been updated by Medeali (previous revision, new revision, compare).

»
2 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

You have to define operator < for your struct or pass a custom comparator to sort.