Chemistry homework help

C++ Ive attached my current cpp file and the file im reading in.I need you create a bool function that compare entries already in a list of structs with the entries about to be added. If the ITEM matches and they have opposite bool values(wanted vs for sale) and if the price for sale is <= to the price wanted you should return true and if those conditions arent met then return false.Attachment 1Attachment 2