【发布时间】:2020-09-26 09:44:57
【问题描述】:
#include <iostream>
#include <string>
#include <boost/algorithm/string.hpp>
using namespace std;
int main() {
string city1, city2;
cout << ("Please enter your citys name");
cin >> city1;
cout << ("Please enter your citys second name");
cin >> city2;
cout << city1 [0,1,2,3,4];
cout << city2 [0,1,2,3,4];
boost::to_upper(city1, city2);
cout << city1,city2;
}
这是我的代码,出于某种原因 boost::to_upper(city1, city2);得到错误:[cquery] no matching function for call 'to_upper'
【问题讨论】:
-
不是
boost::algorithm::to_upper吗? Do not useusing namespace std。cquery只是语言服务器。有什么理由使用boost而不是 C++<algorithm>?