converting first letter of a string to uppercase in cpp code example Example: capitalize first letter c++ string str = "something"; str[0] = toupper(str[0]);