Here is a function that inserts x at the beginning of list L.
void insert(int x, Cell*& L)
{
L = new Cell(x, L);
}
Here is one that inserts x at the end of list L.
void insert(int x, Cell*& L)
{
if(L == NULL) L = new Cell(x, L);
else insert(x, L->next);
}