with methods inserting and finding nodes. These methods are based on your ability to compare two objects. Anything can go instead of SomeObject if you can compare them. So write a
1 2 3 4
struct Record{
std::string name;
int phone;
};
(not necessary, but may be more clear) and overload operators <, > for that struct (same here).