Compator Class Code not wokring


Please check the code and tell where i am wrong

@Shortcuttohell your vector type is int and you are trying to put values of type Book inside it

@Shortcuttohell in line 64 as well, the iterator is pointing to an object, you cant directly print an object. Print it like cout << it->price;

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.