// sl is the string which is converted to lowercase string sl = "Jatin Goyal"; // using transform() function and ::tolower in STL transform(sl.begin(), sl.end(), sl.begin(), ::tolower);