Ma no, ti bastano due righe

codice:
void swaptolower(string &word)
{
    for(int k=0; k<word.length(); k++)
        word[k]=tolower(word[k]);
}