I've been working on this project for a while, and I'm down to the last couple of bits; one of which is sorting as items are created. Basically all the project requires is a linkedlist of "Music Records", each of which contain the Title, Album, Artist, Genre, and Year of a song. Now, the requirment is that when a new Music Record is added, it finds where it goes alphabetically, changes the pointer of the one before it to point to it, and makes it point to the next one instead.

The way I want to go about this is via an iterator, which I have ready to go. It's a pointer that initially points to the first record in the list, and each time I insert a record, it goes through each one to check. Howver, I'm having some major syntax issues (bolded below).

void MusicList::insert_song (string title, string artist, string album, string genre, int year)
{
current = first;
if (first == NULL)
{
first = new MusicRecord(title, artist, album, genre, year);
}
else
{
while (current->NextRecord != NULL)
{
if (current->title {??} title)
current = current->NextRecord;
else
}
current->NextRecord = new MusicRecord(title, artist, album, genre, year);
}

}

I know I can't use the >, <, and == tags for letters. So, how would I go about what I'm trying to do with this syntax-wise?