Таke a look at singly-linked list tutorial. It also has a C++ code.