为什么编译toupper()时说:对它的调用没有匹配的函数?请问是怎么回事??

代码:
#include <iostream>
#include <string>
#include <vector>
#include <cctype>

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;
int main()
{
vector<string> s;
string word;
while(cin >> word ){
s.push_back(word);
}
for (auto word:s)
cout << toupper(word) << endl;
return 0;
}

用的是g++编译器,版本4.9.3
谢谢你的帮助!!

千万里不及你
浏览 54回答 1
1回答

一只斗牛犬

toupper只返回一个对应的大写字母,与原变量无关,也不输出。
打开App,查看更多内容
随时随地看视频慕课网APP