Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <string>
- #include <iostream>
- #include <list>
- using namespace std;
- typedef list<string> LIST_STR;
- int main()
- {
- list<LIST_STR> ls;
- ls.emplace_back();
- ls.emplace_back();
- ls.emplace_back();
- for (auto &x: ls) {
- x.push_back("Hello ");
- x.push_back("world");
- x.push_back("!\n");
- }
- for (auto &x: ls) {
- for (auto &xs: x) {
- cout << xs;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement