#include <iostream>
#include <vector>
#include <string>
#include <cctype>
using namespace std;
int main()
{
vector<string> n1 {"a","b","c"};
n1.push_back("d");
for(auto c = n1.cbegin();c != n1.cend();++c)
*c = toupper(*c);
//为什么这一行老是报no matching function for call to toupper(const std::basic_string<char>&)
cout << *c << endl;
return 0;
}
#include <vector>
#include <string>
#include <cctype>
using namespace std;
int main()
{
vector<string> n1 {"a","b","c"};
n1.push_back("d");
for(auto c = n1.cbegin();c != n1.cend();++c)
*c = toupper(*c);
//为什么这一行老是报no matching function for call to toupper(const std::basic_string<char>&)
cout << *c << endl;
return 0;
}