Sir when we are passing the custom class in set

then the set class take it as inheritence ??? and if we are overloading operator() is it like that??

hello @tejasddongare in this if you wouldnt have declared the custom class then set would have been sorted on the basis of the first value int the pair i,e name otherwise as you have declared the custom class thats why you are able to sort on the basis of the money .
when we are iterating over the set there we are just making a call and in that call we are sorting according to the second parameter.

@tejasddongare if you feel that your doubt is cleared please mark this doubt as resolved .
on off the chance if you still have doubt you can reopen it and ask again .
Happy Learning !!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.