Here is the structure declare code.
struct list_el { int val; struct list_el * next; }; typedef struct list_el item;
And when I
Jonathan Leffler answered you your question.
I just want to add: if you write your code in c++, you don't need to typedef, so you can implement your list just like this:
struct list_el { int val; list_el *next; }; bool delete_element(list_el *item) { list_el *cur = NULL; ... }