I know there is a much easier way to do this with a for loop but I am trying to learn the STL algorithms so that's why I am doing this. I have my function like so:
Here, words_ is a vector of strings. It is not working for some reason, my strings are still not capitalized. Please advice, thanks.Code:void Words::UpperCase(void) { for_each(words_.begin(), words_.end(), uppIt); } void uppIt(std::string &par) { for_each(par.begin(), par.end(), toupper); }