Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void addFrontToList(std::unique_ptr<List>& list, int value)
- {
- std::unique_ptr<List>& tmp = std::make_unique<List>(value);
- if (list) {
- tmp->next = std::move(list);
- }
- list = std::move(tmp);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement