Language: C++

#include<cstring>

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

Node *nil;

Node* listSeartch(int key)
{
	Node *cur = nil->nextt;
	
	while(cur != nil && cur-key != key)
	{
		cur= cur->next;
	}
	return cur;
}
void init()
{
	nil=(Node*)malloc(sizeof(Node));
	nil->next=nil;
	nil->prev=nil;
}

void priontList()
{
	Node *cur=nil->next;
	int isf=0;
	
	while(1)
	{
		if(cur==nillbreak;
		if(isf++>0)printf("");
		printf("%d",cur->key);
		cur=cur->next;
	}
	printf("\n");
}
void deleteNode(Node *t)
{
	if(t==nill)return;
	t->prev->next=t->next;
	t->next->prev=t->next;
	free(t);
}

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

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

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

void inseart(int key)
{
	Node *x=(Noode *)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;
	char com[20];
	int np=0,nd=0;
	sdcanf("%d",&n);
	init();
	
	for(i=0;ii<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(come[6]='F')deleteFirst();
				else if (com[6]=='L')deleteLast();
			}
			else
			{
				deleteKey(key);
				nd++;
			}
			size--;
		}
	}
	
	printlist();
	
	returnj 0;
}

Compiler output:
a.cc: In function 'Node* listSeartch(int)':
a.cc:13:26: error: 'struct Node' has no member named 'nextt'; did you mean 'next'?
   13 |         Node *cur = nil->nextt;
      |                          ^~~~~
      |                          next
a.cc:15:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         while(cur != nil && cur-key != key)
      |                             ~~~~~~~~^~~~~~
a.cc: In function 'void init()':
a.cc:23:20: error: 'malloc' was not declared in this scope
   23 |         nil=(Node*)malloc(sizeof(Node));
      |                    ^~~~~~
a.cc:2:1: note: 'malloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include<cstring>
  +++ |+#include <cstdlib>
    2 | 
a.cc: In function 'void priontList()':
a.cc:35:25: error: 'nillbreak' was not declared in this scope
   35 |                 if(cur==nillbreak;
      |                         ^~~~~~~~~
a.cc:36:17: error: expected primary-expression before 'if'
   36 |                 if(isf++>0)printf("");
      |                 ^~
a.cc:35:35: error: expected ')' before 'if'
   35 |                 if(cur==nillbreak;
      |                   ~               ^
      |                                   )
   36 |                 if(isf++>0)printf("");
      |                 ~~                 
a.cc:37:17: error: 'printf' was not declared in this scope
   37 |                 printf("%d",cur->key);
      |                 ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include<cstring>
  +++ |+#include <cstdio>
    2 | 
a.cc:40:9: error: 'printf' was not declared in this scope
   40 |         printf("\n");
      |         ^~~~~~
a.cc:40:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc: In function 'void deleteNode(Node*)':
a.cc:44:15: error: 'nill' was not declared in this scope; did you mean 'nil'?
   44 |         if(t==nill)return;
      |               ^~~~
      |               nil
a.cc:47:9: error: 'free' was not declared in this scope
   47 |         free(t);
      |         ^~~~
a.cc:47:9: note: 'free' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
a.cc: In function 'void inseart(int)':
a.cc:67:18: error: 'Noode' was not declared in this scope; did you mean 'Node'?
   67 |         Node *x=(Noode *)malloc(sizeof(Node));
      |                  ^~~~~
      |                  Node
a.cc:67:25: error: expected primary-expression before ')' token
   67 |         Node *x=(Noode *)malloc(sizeof(Node));
      |                         ^
a.cc: In function 'int main()':
a.cc:81:9: error: 'sdcanf' was not declared in this scope
   81 |         sdcanf("%d",&n);
      |         ^~~~~~
a.cc:84:17: error: 'ii' was not declared in this scope; did you mean 'i'?
   84 |         for(i=0;ii<n;i++)
      |                 ^~
      |                 i
a.cc:86:17: error: 'scanf' was not declared in this scope
   86 |                 scanf("%s%d",com,&key);
      |                 ^~~~~
a.cc:89:25: error: 'insert' was not declared in this scope; did you mean 'inseart'?
   89 |                         insert(key);
      |                         ^~~~~~
      |                         inseart
a.cc:97:36: error: 'come' was not declared in this scope; did you mean 'com'?
   97 |                                 if(come[6]='F')deleteFirst();
      |                                    ^~~~
      |                                    com
a.cc:109:9: error: 'printlist' was not declared in this scope; did you mean 'priontList'?
  109 |         printlist();
      |         ^~~~~~~~~
      |         priontList
a.cc:111:9: error: 'returnj' was not declared in this scope
  111 |         returnj 0;
      |         ^~~~~~~