Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1.  
  2. namespace stringLL
  3. {
  4.  
  5. struct Node
  6. {
  7. std::string data;
  8. Node *next = nullptr;
  9. };
  10.  
  11. struct strLL
  12. {
  13. Node *head;
  14. Node *tail;
  15. };
  16.  
  17. // command functions start below
  18.  
  19. void insertFront(strLL &list, std::string data)
  20. {
  21. Node *new_node = new Node{data, list.head};
  22. list.head = new_node;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement