How to create a programm with linked list that destroys the nth element? : I am creating a programm with linked list which has  a function that destroys the n-th element of the list and instead places the element whose number is stored in the nth element.

I have created a programm that creates a linked list, but I cant find a way that searches for the nth element.

```

struct elem {
    int value;
    elem *next;
};
int main() {
    elem *start=NULL, *last;
    int a[4]={1,2,3,4};
    /// creating
    for(int i=0;i<4;i++) {
        elem *p = new elem; /// s1
        p->value=a[i]; /// s2
        p->next=NULL; /// s3
        if(start==NULL) start=p; /// s4a
        else last->next=p; /// s4b
        last=p; /// s5
    }
    /// printing
    elem *p=start;
    while (p!=NULL) {
        cout<<p->value<<" ";
        p=p->next;
    }
    /// deleting
    p = start; /// 1
    while (p!=NULL) {
        start = p->next; /// 2
        delete p; /// 3
        p=start; /// 4
    }
}
```

Could I get some help here please? really struggling with linked list, thanks in advance!