需要帮助多普勒链表删除功能在C

时间:2019-07-16 19:43:09

标签: c

    int search(int x){
    node* curr=head;
    while(curr!=NULL){
        if(curr->value==x){
            return curr->value;
        }
        curr=curr->next;
    }
    return -1;
}


    void delet(int x){
    node* curr=search(x);
    if(head==NULL){
        return;
    }
    if(curr!=head){
        curr->prev->next=curr->next;

    }
    else{
        head=curr->next;
        if(curr->next!=NULL){
            curr->next->prev=curr->prev;
        }
    }
}

.. \ src \ vorbereitung.c:71:12:警告:初始化使指针从整数开始而没有强制转换[-Wint-conversion]

0 个答案:

没有答案