Language: C

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

typedef struct node
{
	int nKey;
	node* pNext, *pPrev;
};

typedef node Node;

Node* pNul;

void Init()
{
	pNul = (Node*)malloc(sizeof(Node));
	pNul->pNext = pNul;
	pNul->pPrev = pNul;
}

void insert(int key)
{
	Node* pCur = (Node*)malloc(sizeof(Node));
	pCur->nKey = key;
	pCur->pNext = pNul->pNext;
	pCur->pNext->pPrev = pCur;
	pCur->pPrev = pNul;
	pNul->pNext = pCur;
}

Node* listSearch(int key)
{
	Node* pCur = pNul->pNext;
	while (pCur->nKey != key && pCur->pNext != pNul)
	{
		pCur = pCur->pNext;
	}
	return pCur;
}

void printList()
{
	Node* pCur = pNul->pNext;
	int nIndex = 0;
	while (pCur != pNul)
	{
		if (0 != nIndex)
		{
			printf(" ");
		}
		printf("%d", pCur->nKey);
		++nIndex;
		pCur = pCur->pNext;
	}
	printf("\n");
}

void deleteNode(Node* p)
{
	p->pNext->pPrev = p->pPrev;
	p->pPrev->pNext = p->pNext;
	p->pNext = p;
	p->pPrev = p;
	free(p);
}

void deleteFirst()
{
	deleteNode(pNul->pNext);
}

void deleteLast()
{
	deleteNode(pNul->pPrev);
}

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

int main()
{
	char cod[20];
	int nkey, n;
	scanf("%d", &n);
	Init();
	for (int i = 0; i < n; ++i)
	{
		scanf("%s", cod);
		if ('i' == cod[0])
		{
			scanf("%d", &nkey);
			insert(nkey);
		}
		else if (6 < strlen(cod))
		{
			if ('L' == cod[6])
			{
				deleteLast();
			}
			else if ('F' == cod[6])
			{
				deleteFirst();
			}
		}
		else
		{
			scanf("%d", &nkey);
			deleteKey(nkey);
		}
	}
	printList();
	return 0;
}


Compiler output:
main.c:8:9: error: unknown type name 'node'
    8 |         node* pNext, *pPrev;
      |         ^~~~
main.c:9:1: warning: useless storage class specifier in empty declaration
    9 | };
      | ^
main.c:11:9: error: unknown type name 'node'
   11 | typedef node Node;
      |         ^~~~
main.c: In function 'Init':
main.c:18:13: error: request for member 'pNext' in something not a structure or union
   18 |         pNul->pNext = pNul;
      |             ^~
main.c:19:13: error: request for member 'pPrev' in something not a structure or union
   19 |         pNul->pPrev = pNul;
      |             ^~
main.c: In function 'insert':
main.c:25:13: error: request for member 'nKey' in something not a structure or union
   25 |         pCur->nKey = key;
      |             ^~
main.c:26:13: error: request for member 'pNext' in something not a structure or union
   26 |         pCur->pNext = pNul->pNext;
      |             ^~
main.c:26:27: error: request for member 'pNext' in something not a structure or union
   26 |         pCur->pNext = pNul->pNext;
      |                           ^~
main.c:27:13: error: request for member 'pNext' in something not a structure or union
   27 |         pCur->pNext->pPrev = pCur;
      |             ^~
main.c:28:13: error: request for member 'pPrev' in something not a structure or union
   28 |         pCur->pPrev = pNul;
      |             ^~
main.c:29:13: error: request for member 'pNext' in something not a structure or union
   29 |         pNul->pNext = pCur;
      |             ^~
main.c: In function 'listSearch':
main.c:34:26: error: request for member 'pNext' in something not a structure or union
   34 |         Node* pCur = pNul->pNext;
      |                          ^~
main.c:35:20: error: request for member 'nKey' in something not a structure or union
   35 |         while (pCur->nKey != key && pCur->pNext != pNul)
      |                    ^~
main.c:35:41: error: request for member 'pNext' in something not a structure or union
   35 |         while (pCur->nKey != key && pCur->pNext != pNul)
      |                                         ^~
main.c:37:28: error: request for member 'pNext' in something not a structure or union
   37 |                 pCur = pCur->pNext;
      |                            ^~
main.c: In function 'printList':
main.c:44:26: error: request for member 'pNext' in something not a structure or union
   44 |         Node* pCur = pNul->pNext;
      |                          ^~
main.c:52:34: error: request for member 'nKey' in something not a structure or union
   52 |                 printf("%d", pCur->nKey);
      |                                  ^~
main.c:54:28: error: request for member 'pNext' in something not a structure or union
   54 |                 pCur = pCur->pNext;
      |                            ^~
main.c: In function 'deleteNode':
main.c:61:10: error: request for member 'pNext' in something not a structure or union
   61 |         p->pNext->pPrev = p->pPrev;
      |          ^~
main.c:61:28: error: request for member 'pPrev' in something not a structure or union
   61 |         p->pNext->pPrev = p->pPrev;
      |                            ^~
main.c:62:10: error: request for member 'pPrev' in something not a structure or union
   62 |         p->pPrev->pNext = p->pNext;
      |          ^~
main.c:62:28: error: request for member 'pNext' in something not a structure or union
   62 |         p->pPrev->pNext = p->pNext;
      |                            ^~
main.c:63:10: error: request for member 'pNext' in something not a structure or union
   63 |         p->pNext = p;
      |          ^~
main.c:64:10: error: request for member 'pPrev' in something not a structure or union
   64 |         p->pPrev = p;
      |          ^~
main.c: In function 'deleteFirst':
main.c:70:24: error: request for member 'pNext' in something not a structure or union
   70 |         deleteNode(pNul->pNext);
      |                        ^~
main.c: In function 'deleteLast':
main.c:75:24: error: request for member 'pPrev' in something not a structure or union
   75 |         deleteNode(pNul->pPrev);
      |                        ^~