// This example (part of a series) illustrates how to to use a functor, // except that it uses a range-based for loop, instead. #include #include #include using namespace std; int main() { string name = "Beverly Hills Chihuahua"; for (char &c : name) // note the & for reference c = toupper(c); cout << name << '\n'; }