void removeAll(int x, ListCell*& L) { if(L != NULL) { if(L-> == x) { ListCell* p = L; L = L->tail; delete p; removeAll(x, L); } else { removeAll(x, L->tail)) } } }