How to insert node to tree while comparing string instead of int
I want to create a program that insert phone record to a binary search tree...
The record accept name and phone number as input, so when i want to compare the data(key), which is the string type name, i have to compare it in alphabetical order.
For example when i insert Kevin to the tree, Aaron will be the first node, and Brandon will be inserted again to the tree, the program will compare these 2 strings and insert to the left node if the alphabet is less than the first node. Does anyone know how to compare them? I know the equal method is to compare the string but is only for same name. I need help immediately because I have to pass up this assignment at thursday.