为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

C++
千万里不及你 2023-02-12 14:14:46
代码:#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谢谢你的帮助!!
查看完整描述

1 回答

?
一只斗牛犬

TA贡献1784条经验 获得超2个赞

toupper只返回一个对应的大写字母,与原变量无关,也不输出。

查看完整回答
反对 回复 2023-02-15
  • 1 回答
  • 0 关注
  • 53 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信