Language: C++

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

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

Node *nil;

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

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

void plist(void){
  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");
}

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

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;
}

int main(){
  int key, n, i;
  int size = 0, np=0, nd=0;
  char com[20];

  scanf("%d",&n);
  iii();
  for(i=0; i<n; i++){
    scanf("%s%d", com, &key);
    if(com[0]=='i'){
      insert(key);
      np++;
      size++;
    } else if (com[0]=='d'){
      if(strlen(com)>6){
        if(com[6]=='F')
          ddd(nil->next);
        else if(com[6]=='L')
          ddd(nil->prev);
      } else {
        ddd(listSearch(key));
        nd++;
      }
      size--;
    }
  }
  plist();
  return 0;
}

Compiler output:
a.cc:7:3: error: 'Node' does not name a type
    7 |   Node *next;
      |   ^~~~
a.cc:8:3: error: 'Node' does not name a type
    8 |   Node *prev;
      |   ^~~~
a.cc: In function 'Node* listSearch(int)':
a.cc:14:20: error: 'struct Node' has no member named 'next'
   14 |   Node *cur = nil->next;
      |                    ^~~~
a.cc:16:16: error: 'struct Node' has no member named 'next'
   16 |     cur - cur->next;
      |                ^~~~
a.cc: In function 'void iii()':
a.cc:23:8: error: 'struct Node' has no member named 'next'
   23 |   nil->next = nil;
      |        ^~~~
a.cc:24:8: error: 'struct Node' has no member named 'prev'
   24 |   nil->prev = nil;
      |        ^~~~
a.cc: In function 'void plist()':
a.cc:28:20: error: 'struct Node' has no member named 'next'
   28 |   Node *cur = nil->next;
      |                    ^~~~
a.cc:35:16: error: 'struct Node' has no member named 'next'
   35 |     cur = cur->next;
      |                ^~~~
a.cc: In function 'void ddd(Node*)':
a.cc:42:6: error: 'struct Node' has no member named 'prev'
   42 |   t->prev->next = t->next;
      |      ^~~~
a.cc:42:22: error: 'struct Node' has no member named 'next'
   42 |   t->prev->next = t->next;
      |                      ^~~~
a.cc:43:6: error: 'struct Node' has no member named 'next'
   43 |   t->next->prev = t->prev;
      |      ^~~~
a.cc:43:22: error: 'struct Node' has no member named 'prev'
   43 |   t->next->prev = t->prev;
      |                      ^~~~
a.cc: In function 'void insert(int)':
a.cc:50:6: error: 'struct Node' has no member named 'next'
   50 |   x->next = nil-next;
      |      ^~~~
a.cc:50:17: error: 'next' was not declared in this scope
   50 |   x->next = nil-next;
      |                 ^~~~
a.cc:51:8: error: 'struct Node' has no member named 'next'
   51 |   nil->next->prev -> x;
      |        ^~~~
a.cc:52:8: error: 'struct Node' has no member named 'next'
   52 |   nil->next = x;
      |        ^~~~
a.cc:53:6: error: 'struct Node' has no member named 'prev'
   53 |   x->prev = nil;
      |      ^~~~
a.cc: In function 'int main()':
a.cc:72:20: error: 'struct Node' has no member named 'next'
   72 |           ddd(nil->next);
      |                    ^~~~
a.cc:74:20: error: 'struct Node' has no member named 'prev'
   74 |           ddd(nil->prev);
      |                    ^~~~