I'm wondering how can I remove an object from a C++ list - I'm trying to create a book management software and I'd like to have a function in the database (which is a list) that removes a book from it which is a passed object. I was thinking about this solution, but it won't work - seems like the == operator is not properly overloaded? Or maybe this solution is not going to work?
class Database
{
    list <Books> mybooks;
public:
    void BookDel(Books & temp)
    {
        mybooks.remove(temp);
    }
}
 
     
    