Wwoc 2017-07-31 08:19 采纳率: 83.3%
浏览 1059
已采纳

一个简单的C++问题... 这个为什么不能把小写变成大写

vector text;
string s = "hello world" ;
text.push_back(s);
for (auto temp = text.begin(); temp != text.end() && temp->empty(); temp++)
{
for (auto temp2=(*temp).begin();temp2!=(*temp).end();temp2++)
*temp2 = toupper(*temp2);
}
for (auto it = text.cbegin(); it != text.cend() && !it->empty(); ++it)
cout << *it << endl;


  • 写回答

3条回答 默认 最新

      报告相同问题?

      悬赏问题

      • ¥20 如何将tiff格式数据作为因变量,输入已建立的机器学习模型中,得到结果同样为空间tiff格式的数据
      • ¥20 编写一个脚本监听sql的运行状态并联动另一台服务器上的服务重启
      • ¥215 一年前的硬盘数据恢复
      • ¥15 htmclxx 求提供给64位windows预编译库
      • ¥15 在线考试如何监控计算机资源
      • ¥15 防火墙端口不能启动。
      • ¥15 关于#OpenCV#的问题,如何解决?
      • ¥20 这段代码位置环为什么在keil仿真中没有值
      • ¥15 C++的regex库正则表达式匹配汉字、字母和数字,运行程序报错异常
      • ¥15 docker使用overlay跨主机互联问题