I am having trouble turning strings to uppercase for an alphabetical sort. My program actually begins to slow down and freeze after the third set of words. What am I doing wrong?
string iName = list[i]->GetLastName(); // This just returns a string of a name
string jName = list[j]->GetLastName();
for(unsigned int k = 0; k < iName.length(); k++)
{
iName[k] = toupper(iName[k]);
}
for(unsigned int l = 0; l < jName.length(); l++)
{
iName[l] = toupper(jName[l]);
}