how to capitalize the first letter of a each word in a string in c++ code example Example: capitalize first letter c++ string str = "something"; str[0] = toupper(str[0]);