I am trying to create a program that has a list of contacts where the user can search for a contact's name based on a phone number. Sorry for including so much code but it is necessary for understanding my problem:

```
#include <iostream>
#include <string>
#include <set>
using namespace std;

struct ContactItem
{
    string name;
    string phoneNumber;
    string displayAs;

    ContactItem(const string inName, const string inNumber) : name(inName), phoneNumber(inNumber)
    {
        displayAs = name + ": " + phoneNumber;
    }

    bool operator== (const ContactItem& searchParameter) const
    {
        return (this->phoneNumber == searchParameter.phoneNumber);
    }

    bool operator< (const ContactItem& compareResult) const
    {
        return (this->name < compareResult.name);
    }

    operator const char*() const
    {
        return displayAs.c_str();
    }
};

int main()
{
    //Initialize a set and populate it with contacts of type ContactItem
    set<ContactItem> contactBook;
    contactBook.insert(ContactItem("Sally", "123654864"));
    contactBook.insert(ContactItem("Joe", "8435102654"));
    contactBook.insert(ContactItem("Steve", "8135691234"));
    contactBook.insert(ContactItem("Alice", "8432489425"));

    //Search for a contact's name by only being given their number
    cout << "Please give the number of one contact whose name you would like to know: " << endl;
    string userNumber;
    getline(cin, userNumber);

    auto findNumber = contactBook.find(ContactItem("", userNumber));

    if (findNumber != contactBook.end())
        cout << "The name of the contact whose number matches the phone number given is: " << (*findNumber).name << endl;
    else
        cout << "Contact not found" << endl;

    return 0;
}

```

My problem always seems to be with the line `auto findNumber = contactBook.find(userNumber);`. Every single time I run this code, the message "Contact not found" is displayed. I can't figure out what I'm doing wrong. Is it my redefinition of `operator==`?

The above code was inspired by Rao, Siddhartha. *Sams Teach Yourself C++ in One Hour a Day*. 8th ed., Indianapolis, IN, Sams, 2017.