Language: C++

int main()
{
	int N;
	int d;
	char command[20];
	scanf("%d",&N);
	for(int i=0;i<N;i++){
	   scanf("%s",command);
	   if(command[0]=='i'){
		   scanf("%d",&d);
		   L.push_front(d);
	   }

	   else if(command[6]=='F'){
		   L.pop_front();
	   }
	   else if(command[6]=='L'){
		   L.pop_back();
	   }
	    else if(command[0]=='d'){
		   scanf("%d",&d);
		   for(list<int>::iterator it=L.begin();it!=L.end();it++)
		   {
			   if(d==*it){
				   L.erase(it);
				   break;
			   }
		   }
	   }
	}
	int i=0;
	for(list<int>::iterator it=L.begin();it!=L.end();it++){
		if(i++)printf(" ");
		printf("%d",*it);
	}
	printf("\n");

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'scanf' was not declared in this scope
    6 |         scanf("%d",&N);
      |         ^~~~~
a.cc:11:20: error: 'L' was not declared in this scope
   11 |                    L.push_front(d);
      |                    ^
a.cc:15:20: error: 'L' was not declared in this scope
   15 |                    L.pop_front();
      |                    ^
a.cc:18:20: error: 'L' was not declared in this scope
   18 |                    L.pop_back();
      |                    ^
a.cc:22:24: error: 'list' was not declared in this scope
   22 |                    for(list<int>::iterator it=L.begin();it!=L.end();it++)
      |                        ^~~~
a.cc:22:29: error: expected primary-expression before 'int'
   22 |                    for(list<int>::iterator it=L.begin();it!=L.end();it++)
      |                             ^~~
a.cc:22:57: error: 'it' was not declared in this scope; did you mean 'i'?
   22 |                    for(list<int>::iterator it=L.begin();it!=L.end();it++)
      |                                                         ^~
      |                                                         i
a.cc:22:61: error: 'L' was not declared in this scope
   22 |                    for(list<int>::iterator it=L.begin();it!=L.end();it++)
      |                                                             ^
a.cc:32:13: error: 'list' was not declared in this scope
   32 |         for(list<int>::iterator it=L.begin();it!=L.end();it++){
      |             ^~~~
a.cc:32:18: error: expected primary-expression before 'int'
   32 |         for(list<int>::iterator it=L.begin();it!=L.end();it++){
      |                  ^~~
a.cc:32:46: error: 'it' was not declared in this scope; did you mean 'i'?
   32 |         for(list<int>::iterator it=L.begin();it!=L.end();it++){
      |                                              ^~
      |                                              i
a.cc:32:50: error: 'L' was not declared in this scope
   32 |         for(list<int>::iterator it=L.begin();it!=L.end();it++){
      |                                                  ^
a.cc:33:24: error: 'printf' was not declared in this scope
   33 |                 if(i++)printf(" ");
      |                        ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:34:17: error: 'printf' was not declared in this scope
   34 |                 printf("%d",*it);
      |                 ^~~~~~
a.cc:34:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:36:9: error: 'printf' was not declared in this scope
   36 |         printf("\n");
      |         ^~~~~~
a.cc:36:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'