Created
May 23, 2013 02:37
-
-
Save ungood/5632446 to your computer and use it in GitHub Desktop.
Very simple linked list example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct { | |
string name; | |
node* next; | |
} node; | |
node* first = null; | |
void append(string name) { | |
new_node = new linked_list { | |
name = name, | |
next = first | |
}; | |
first = new_node; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment