I'm attempting to compare two strings for use in insertion for a binary tree. I want to compare the strings similar to how integers are compared, I want the whole string compared, not character by character and returning a value once there is an inequality. How can I accomplish this? Can this method you're suggesting be incorporated to compare struct members? Like if (temp->data > current->data) ... ?
i.e.
Dan < dan < dane



LinkBack URL
About LinkBacks




I was just thinking that there was an internal way of doing it that didn't require writing a separate function. Or perhaps I was just looking for confirmation that I had to do this and that's why things were going wrong.