Language: C++

#include<cstdio>
#include<cstdlib>
typedef struct Node
{
	int value;
    struct node* prev,* next;
}Node;
Node* head;
void Init()
{
    head=(Node*)malloc(sizeof(Node));
    head->next=head;
    head->prev=head;
}

Node* FindNode(int x)
{
	Node*temp=head->next;
	while(temp!=head&&temp->value!=x)
        temp=temp->next;
    return temp;
}
void Insert(int x)
{
	Node*temp=(Node*)malloc(sizeof(Node));
    temp->value=x;
    head->next->prev=temp;
    temp->next=head->next;
    head->next=temp;
    temp->prev=head;
}

void Delete(Node*temp)
{
	if(!temp)
        return ;
	temp->next->prev=temp->prev;
	temp->prev->next=temp->next;
    free(temp);
}

void DeleteFirst()
{
    Delete(head->next);
}
void DeleteLast()
{
	Delete(head->prev);
}

void PrintList()
{
    Node*temp=head->next;
    int flag=0;
    while(1)
    {
        if(temp==head)
            break;
        else
        {
            if(flag++>0)
                printf(" ");
            printf("%d",temp->value);
            temp=temp->next;
        }
    }
    printf("\n");
}
int main()
{
	int n;
	scanf("%d",&n);
	char str[12];
	int x;
	Init();

	while(n--)
	{
		scanf("%s%d",str,&x);
		if(str[0]=='i'){Insert(x);}
		else if(str[0]=='d'&&str[6]=='F')DeleteFirst();
		else if(str[0]=='d'&&str[6]=='L')DeleteLast();
		else if(str[0]=='d'){Delete(FindNode(x));}
	}

	/*
	for(i = 0; i < n; i++) {
        scanf("%s %d", str, &x);
        if (str[0] == 'i') {
            Insert(x);
        }
        else if(str[0] == 'd') {
            if(str[6] == 'F')
                DeleteFirst();
            else if(str[6] == 'L')
                DeleteLast();
            else
                delete(FindNode(x));
        }
    }*/
    /*
    Node* temp=head->next;
    while(temp->next!=head)
    {
        printf("%d ",temp->value);
        temp=temp->next;
    }
    printf("%d\n",temp->value);
    */
    PrintList();
	return 0;
}

Compiler output:
a.cc: In function 'void Init()':
a.cc:12:16: error: cannot convert 'Node*' to 'node*' in assignment
   12 |     head->next=head;
      |                ^~~~
      |                |
      |                Node*
a.cc:13:16: error: cannot convert 'Node*' to 'node*' in assignment
   13 |     head->prev=head;
      |                ^~~~
      |                |
      |                Node*
a.cc: In function 'Node* FindNode(int)':
a.cc:18:25: error: cannot convert 'node*' to 'Node*' in initialization
   18 |         Node*temp=head->next;
      |                   ~~~~~~^~~~
      |                         |
      |                         node*
a.cc:6:12: note: class type 'node' is incomplete
    6 |     struct node* prev,* next;
      |            ^~~~
a.cc:20:20: error: cannot convert 'node*' to 'Node*' in assignment
   20 |         temp=temp->next;
      |              ~~~~~~^~~~
      |                    |
      |                    node*
a.cc:6:12: note: class type 'node' is incomplete
    6 |     struct node* prev,* next;
      |            ^~~~
a.cc: In function 'void Insert(int)':
a.cc:27:15: error: invalid use of incomplete type 'struct node'
   27 |     head->next->prev=temp;
      |               ^~
a.cc:6:12: note: forward declaration of 'struct node'
    6 |     struct node* prev,* next;
      |            ^~~~
a.cc:29:16: error: cannot convert 'Node*' to 'node*' in assignment
   29 |     head->next=temp;
      |                ^~~~
      |                |
      |                Node*
a.cc:30:16: error: cannot convert 'Node*' to 'node*' in assignment
   30 |     temp->prev=head;
      |                ^~~~
      |                |
      |                Node*
a.cc: In function 'void Delete(Node*)':
a.cc:37:19: error: invalid use of incomplete type 'struct node'
   37 |         temp->next->prev=temp->prev;
      |                   ^~
a.cc:6:12: note: forward declaration of 'struct node'
    6 |     struct node* prev,* next;
      |            ^~~~
a.cc:38:19: error: invalid use of incomplete type 'struct node'
   38 |         temp->prev->next=temp->next;
      |                   ^~
a.cc:6:12: note: forward declaration of 'struct node'
    6 |     struct node* prev,* next;
      |            ^~~~
a.cc: In function 'void DeleteFirst()':
a.cc:44:18: error: cannot convert 'node*' to 'Node*'
   44 |     Delete(head->next);
      |            ~~~~~~^~~~
      |                  |
      |                  node*
a.cc:33:18: note:   initializing argument 1 of 'void Delete(Node*)'
   33 | void Delete(Node*temp)
      |             ~~~~~^~~~
a.cc:6:12: note: class type 'node' is incomplete
    6 |     struct node* prev,* next;
      |            ^~~~
a.cc: In function 'void DeleteLast()':
a.cc:48:22: error: cannot convert 'node*' to 'Node*'
   48 |         Delete(head->prev);
      |                ~~~~~~^~~~
      |                      |
      |                      node*
a.cc:33:18: note:   initializing argument 1 of 'void Delete(Node*)'
   33 | void Delete(Node*temp)
      |             ~~~~~^~~~
a.cc:6:12: note: class type 'node' is incomplete
    6 |     struct node* prev,* next;
      |            ^~~~
a.cc: In function 'void PrintList()':
a.cc:53:21: error: cannot convert 'node*' to 'Node*' in initialization
   53 |     Node*temp=head->next;
      |               ~~~~~~^~~~
      |                     |
      |                     node*
a.cc:6:12: note: class type 'node' is incomplete
    6 |     struct node* prev,* next;
      |            ^~~~
a.cc:64:24: error: cannot convert 'node*' to 'Node*' in assignment
   64 |             temp=temp->next;
      |                  ~~~~~~^~~~
      |                        |
      |                        node*
a.cc:6:12: note: class type 'node' is incomplete
    6 |     struct node* prev,* next;
      |            ^~~~