SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top