Right now I have a class item
   class Item{
        public:
            short p;        //profit
            short w;        //weight
            bool *x;        //pointer to original solution variable
            void set_values (short p, short w, bool *x);
    };
and I need to compare two different instances so that it checks the values of each one and returns either true/false
 if (Item a < Item b){
       //do something
 }
How can I do that? I've been reading cppreference but I don't really understand how to do it.
 
     
     
     
    