Singly-linked list/Element definition

From Rosetta Code
Revision as of 15:31, 19 March 2007 by MikeMol (talk | contribs) (Created task)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Task
Singly-linked list/Element definition
You are encouraged to solve this task according to the task description, using any language you may know.

Define the data structure for a singly-linked list element. Said an element should contain a data member capable of holding a numeric value.

C

struct link {
  link *next;
  int data;
}