1.基本操作
#include<iostream> #include<string> #include<fstream> #include<vector> #include<map> #include<set> #include<list> #include<sstream> #include<algorithm> using namespace std; // int main(int argc,char *argv[]){ string line; vector<string>v; while (getline(cin, line)){ v.push_back(line); for (auto i = v.begin(); i != v.end() && !i->empty(); i++){ for (auto &c : *i) c = toupper(c); cout << *i<< endl; } } system("pause"); return 0; }