Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <vector>
- using namespace std;
- void MoveStrings(vector<string> source, vector<string>& destination)
- {
- for (int i = 0; i < source.size(); i++)
- destination.push_back(source[i]);
- source.clear();
- }
- int main() {
- vector<string> a = {"a", "h"};
- vector<string> b = {"y", "a"};
- MoveStrings(a, b);
- for (auto x : b)
- cout << x << " ";
- return 0;
- }
Add Comment
Please, Sign In to add comment