Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<vector>
- #include<iostream>
- #include<string>
- #include<sstream>
- using namespace std;
- void process_vector(vector<string>&);
- int main()
- {
- string str, word;
- getline(cin, str);
- stringstream ss(str);
- vector<string> vs;
- while (ss >> word)
- {
- vs.push_back(word);
- }
- process_vector(vs);
- for (auto word : vs)
- {
- cout << word << " ";
- }
- return 0;
- }
- void process_vector(vector<string>& vs)
- {
- // как-нибудь обрабатываем вектор:
- for (auto &word : vs)
- {
- for (auto &ch : word)
- {
- ch++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement