Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef struct node{
    int key;
    node *prev;
    node *next;
}Node;

Node *nil;

void init(){ // ???????????????
    nil = (Node*)malloc(sizeof(Node));
    nil->next = nil;
    nil->prev = nil;
}

void insert(int key){
    Node *x = (Node*)malloc(sizeof(Node));
    x->key = key;
    x->next = nil->next;
    nil->next->prev = x;
    nil->next = x;
    x->prev = nil;
}

Node* listSearch(int key){
    Node* cur = nil->next;
    while(cur != nil && cur->key != key){
        cur = cur->next;
    }
    return cur;
}

void deleteNode(Node *t){
    if(t == nil) return;
    t->prev->next = t->next;
    t->next->prev = t->prev;
    free(t);
}

void deleteFirst(){
    deleteNode(nil->next);
}

void deleteLast(){
    deleteNode(nil->prev);
}

void deleteKey(int key){
    deleteNode(listSearch(key));
}

void printList(){
    Node* cur = nil->next;
    int isf = 0;
    while(1){
        if(cur == nil) break;
        if(isf++ > 0) printf(" ");
        printf("%d", cur->key);
        cur = cur->next;
    }
    printf("\n");
}

int main(void){
    int n,key,i,size = 0;
    char com[20];
    scanf("%d",&n);
    init();
    for(i=0;i<n;i++){
        scanf("%s %d", com, &key);
        if(com[0] == 'i'){
            insert(key);
        }else if(com[0] == 'd'){
            deleteKey(key);
        }
    }
}

Compiler output:
main.c:7:5: error: unknown type name 'node'
    7 |     node *prev;
      |     ^~~~
main.c:8:5: error: unknown type name 'node'
    8 |     node *next;
      |     ^~~~
main.c: In function 'init':
main.c:15:15: error: assignment to 'int *' from incompatible pointer type 'Node *' {aka 'struct node *'} [-Wincompatible-pointer-types]
   15 |     nil->next = nil;
      |               ^
main.c:16:15: error: assignment to 'int *' from incompatible pointer type 'Node *' {aka 'struct node *'} [-Wincompatible-pointer-types]
   16 |     nil->prev = nil;
      |               ^
main.c: In function 'insert':
main.c:23:14: error: request for member 'prev' in something not a structure or union
   23 |     nil->next->prev = x;
      |              ^~
main.c:24:15: error: assignment to 'int *' from incompatible pointer type 'Node *' {aka 'struct node *'} [-Wincompatible-pointer-types]
   24 |     nil->next = x;
      |               ^
main.c:25:13: error: assignment to 'int *' from incompatible pointer type 'Node *' {aka 'struct node *'} [-Wincompatible-pointer-types]
   25 |     x->prev = nil;
      |             ^
main.c: In function 'listSearch':
main.c:29:17: error: initialization of 'Node *' {aka 'struct node *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   29 |     Node* cur = nil->next;
      |                 ^~~
main.c:31:13: error: assignment to 'Node *' {aka 'struct node *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   31 |         cur = cur->next;
      |             ^
main.c: In function 'deleteNode':
main.c:38:12: error: request for member 'next' in something not a structure or union
   38 |     t->prev->next = t->next;
      |            ^~
main.c:39:12: error: request for member 'prev' in something not a structure or union
   39 |     t->next->prev = t->prev;
      |            ^~
main.c: In function 'deleteFirst':
main.c:44:19: error: passing argument 1 of 'deleteNode' from incompatible pointer type [-Wincompatible-pointer-types]
   44 |     deleteNode(nil->next);
      |                ~~~^~~~~~
      |                   |
      |                   int *
main.c:36:23: note: expected 'Node *' {aka 'struct node *'} but argument is of type 'int *'
   36 | void deleteNode(Node *t){
      |                 ~~~~~~^
main.c: In function 'deleteLast':
main.c:48:19: error: passing argument 1 of 'deleteNode' from incompatible pointer type [-Wincompatible-pointer-types]
   48 |     deleteNode(nil->prev);
      |                ~~~^~~~~~
      |                   |
      |                   int *
main.c:36:23: note: expected 'Node *' {aka 'struct node *'} but argument is of type 'int *'
   36 | void deleteNode(Node *t){
      |                 ~~~~~~^
main.c: In function 'printList':
main.c:56:17: error: initialization of 'Node *' {aka 'struct node *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   56 |     Node* cur = nil->next;
      |                 ^~~
main.c:62:13: error: assignment to 'Node *' {aka 'struct node *'} from incompatible pointer type 'int *' [-Wincompatible-pointer-types]
   62 |         cur = cur->next;
      |             ^