submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s369821185
p02265
C
#include <stdint.h> #include <stdlib.h> #define UTIL_PRINT_ARRAY(arr, size) \ do { ...
main.c:15:3: error: unknown type name 'double_linked_list_t' 15 | double_linked_list_t *prev; | ^~~~~~~~~~~~~~~~~~~~ main.c:16:3: error: unknown type name 'double_linked_list_t' 16 | double_linked_list_t *next; | ^~~~~~~~~~~~~~~~~~~~ main.c:20:8: error: expected ';' before 'struct' 20 | tye...
s260256382
p02265
C
#include <stdint.h> #include <stdlib.h> #define UTIL_PRINT_ARRAY(arr, size) \ do { ...
main.c:15:3: error: unknown type name 'double_linked_list_t' 15 | double_linked_list_t *prev; | ^~~~~~~~~~~~~~~~~~~~ main.c:16:3: error: unknown type name 'double_linked_list_t' 16 | double_linked_list_t *next; | ^~~~~~~~~~~~~~~~~~~~ main.c: In function 'double_linked_list_create': main.c:27:5...
s447071949
p02265
C
#include <stdint.h> #include <stdbool.h> #include <stdlib.h> #define UTIL_PRINT_ARRAY(arr, size) \ do { ...
main.c:16:3: error: unknown type name 'double_linked_list_t' 16 | double_linked_list_t *prev; | ^~~~~~~~~~~~~~~~~~~~ main.c:17:3: error: unknown type name 'double_linked_list_t' 17 | double_linked_list_t *next; | ^~~~~~~~~~~~~~~~~~~~ main.c: In function 'double_linked_list_create': main.c:28:5...
s693315230
p02265
C
#include <stdint.h> #include <stdbool.h> #include <stdlib.h> #define UTIL_PRINT_ARRAY(arr, size) \ do { ...
main.c: In function 'double_linked_list_create': main.c:28:5: error: implicit declaration of function 'perror' [-Wimplicit-function-declaration] 28 | perror("memory is full\n"); | ^~~~~~ main.c: In function 'main': main.c:193:56: error: implicit declaration of function 'UTIL_ARRAY_SIZE' [-Wimplicit-fun...
s276053103
p02265
C
#include<stdio.h> #include<string.h> #define N 10000 int main(){ int i,j,n,num,list[N],head=0,tmp,tail=0; char sel[N][11]; char *s1="insert"; char *s2="delete"; char *s3="deleteFirst"; char *s4="deleteLast"; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",sel[i]); if(strcmp(sel[i],s1)==0){ ...
main.c: In function 'main': main.c:47:3: error: expected declaration or statement at end of input 47 | return 0; | ^~~~~~
s788457090
p02265
C
#include<stdio.h> #include<string.h> #include<stdlib.h> #define N 2000000 struct node { int key; struct node *next; struct node *prev; }; typedef struct node *NodePointer; typedef struct{ char ask[20]; int key2; }Roll; Roll Ask[N]; NodePointer insert(int); NodePointer finditem(int); NodeP...
main.c: In function 'main': main.c:34:17: error: stray '#' in program 34 | scanf("%d", #include<stdio.h> | ^ main.c:34:18: error: 'include' undeclared (first use in this function) 34 | scanf("%d", #include<stdio.h> | ^~~~~~~ main.c:34:18: note: each undeclared ...
s813527835
p02265
C
#include<stdio.h> #include<stdlib.h> struct node { int key; struct node *next, *prev; }; struct node *nil; void init() { nil=(struct node *)malloc(sizeof(node)); nil->next=nil; nil->prev=nil; } node *listSearch(int keys) { node *cur=nil->next; while(cur!=nil && cur->key!=keys) cur...
main.c: In function 'init': main.c:13:38: error: 'node' undeclared (first use in this function) 13 | nil=(struct node *)malloc(sizeof(node)); | ^~~~ main.c:13:38: note: each undeclared identifier is reported only once for each function it appears in main.c: At top level...
s666325131
p02265
C
#include<stdio.h> #include<stdlib.h> struct node { int key; struct node *next, *prev; }; struct node *nil; void init() { nil=(struct node *)malloc(sizeof(node)); nil->next=nil; nil->prev=nil; } node *listSearch(int keys) { node *cur=nil->next; while(cur!=nil && cur->key!=keys) cur...
main.c: In function 'init': main.c:13:38: error: 'node' undeclared (first use in this function) 13 | nil=(struct node *)malloc(sizeof(node)); | ^~~~ main.c:13:38: note: each undeclared identifier is reported only once for each function it appears in main.c: At top level...
s020939015
p02265
C
#include<stdio.h> #include<stdlib.h> struct node { int key; struct node *next, *prev; }; struct node *nil; void init() { nil=(struct node *)malloc(sizeof(struct node)); nil->next=nil; nil->prev=nil; } struct node *listSearch(int keys) { node *cur=nil->next; while(cur!=nil && cur->key!=key...
main.c: In function 'listSearch': main.c:20:5: error: unknown type name 'node'; use 'struct' keyword to refer to the type 20 | node *cur=nil->next; | ^~~~ | struct main.c:20:15: error: initialization of 'int *' from incompatible pointer type 'struct node *' [-Wincompatible-pointer-types] ...
s699704694
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct{ int key; Node *next,*prev; } Node; Node *nil; void init(){ nil = (Node*)malloc(sizeof(Node)); nil -> next = nil; nil -> prev = nil; } void printList(){ Node *cur = nil -> next; int isf = 0; while(1){ if(cur == nil) break;...
main.c:7:3: error: unknown type name 'Node' 7 | Node *next,*prev; | ^~~~ main.c: In function 'init': main.c:14:15: error: assignment to 'int *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types] 14 | nil -> next = nil; | ^ main.c:15:15: error: assignment to 'in...
s883917331
p02265
C
#include <stdio.h> #include <ctype.h> #include <string.h> typedef struct _node { int key; struct _node *next; struct _node *prev; } NODE, *PNODE; PNODE root; void init(void) { root = malloc(sizeof(NODE)); root->next = root; root->prev = root; } void insert(key) { PNODE t = malloc(sizeof(NODE)); ...
main.c: In function 'init': main.c:14:10: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] 14 | root = malloc(sizeof(NODE)); | ^~~~~~ main.c:4:1: note: include '<stdlib.h>' or provide a declaration of 'malloc' 3 | #include <string.h> +++ |+#include <stdlib.h> ...
s414403834
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct node{ int key; struct node* next; struct node* prev; }Node; Node *NIL; void init(void); void printList(void); Node* listSearch(int); void insert(int); void deleteNode(Node *); void deleteLast(void); void deleteKey(int); int main(){ ...
main.c: In function 'main': main.c:35:23: error: implicit declaration of function 'deleteFirst'; did you mean 'deleteLast'? [-Wimplicit-function-declaration] 35 | if(com[6] == 'F') deleteFirst(); | ^~~~~~~~~~~ | deleteLast main.c: In function 'listSearch': ...
s567682546
p02265
C
#include<stdio.h> int main(){ char c[10]; int n,i,j,k,h[100000],min=0,max=0,num; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s",c); if(c[0] == 'i'){ scanf("%d",&h[max]); max++; } else if(c[0]=='d'){ if(c[6]=='F'){ min++; } else if(c[6]=='L'){ max-...
main.c: In function 'main': main.c:45:1: error: expected declaration or statement at end of input 45 | } | ^
s556541546
p02265
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN] int head,tail,n; void enqueue(P x){ Q[tail] = x; tail = (tail+1)%LEN; } P dequeue(void){ P x = Q[LEN]; head = (head+1)%LEN; return x; } int min(int a,int b){ return a < b ? a : b; } int main(void){...
main.c:10:9: error: expected ';' before 'int' 10 | P Q[LEN] | ^ | ; 11 | int head,tail,n; | ~~~ main.c: In function 'enqueue': main.c:14:9: error: 'Q' undeclared (first use in this function) 14 | Q[tail] = x; | ^ main.c:14:9: note: each undeclared i...
s872006498
p02265
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN] int head,tail,n; void enqueue(P x){ Q[tail] = x; tail = (tail+1)%LEN; } P dequeue(void){ P x = Q[LEN]; head = (head+1)%LEN; return x; } int min(int a,int b){ return a < b ? a : b; } int main(void){...
main.c:10:9: error: expected ';' before 'int' 10 | P Q[LEN] | ^ | ; 11 | int head,tail,n; | ~~~ main.c: In function 'enqueue': main.c:14:9: error: 'Q' undeclared (first use in this function) 14 | Q[tail] = x; | ^ main.c:14:9: note: each undeclared i...
s801294688
p02265
C
#include <cstdio> #include <cstdlib> #include <cstring> struct Node { int key; Node *next, *prev; }; Node *nil; void init(void) { nil = (Node *)malloc(sizeof(Node)); nil->next = nil; nil->prev = nil; } void insert(int key) { Node *x = (Node *)malloc(sizeof(Node)); x->key = key; x->next = nil->next; ...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s041902361
p02265
C
#include <cstdio> #include <cstdlib> #include <cstring> struct Node { int key; Node *next, *prev; }; Node *nil; Node* listSearch(int key) { Node *cur = nil->next; while(cur != nil && cur->key != key) { cur = cur->next; } return cur; } void init(void) { nil = (Node *)malloc(sizeof(Node)); nil->n...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s540981350
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct Node{ int key; struct Node *next, *prev; }Node; Node *nil; struct Node* listSearch(int key){ Node *cur = nil->next; while(cur != nil && cur ->key !=key){ cur =cur->next; } return cur; } void init(){ nil = (Node *)malloc(sizeof(N...
main.c: In function 'printList': main.c:30:17: error: expected expression before '?' token 30 | printf("%d",???cur->key); | ^
s193923780
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 2000001 //????????????£???????????? struct Node{ int key; struct Node *next,*prev; }; struct Node *nil; struct Node* listSearch(int key){ struct Node *cur=nil->next; while(cur!=nil&&cur->key!=key){ cur=cur->next; } return cur; } ...
main.c:96:1: error: unknown type name 'Compile' 96 | Compile Error Logs: | ^~~~~~~ main.c:96:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Logs' 96 | Compile Error Logs: | ^~~~ main.c:102:6: error: stray '#' in program 102 | Case # Verdict CPU Time ...
s511223947
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct node{ int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; void insert(int keydata){ NodePointer x; x=malloc(sizeof(struct node)); x->key=keydata; x->next=nil->next; x->prev=nil; nil->n...
main.c: In function 'insert': main.c:17:13: error: 'nil' undeclared (first use in this function) 17 | x->next=nil->next; | ^~~ main.c:17:13: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'delete': main.c:25:5: error: 'nil' undeclared ...
s513739909
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct node{ int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; void insert(int keydata){ NodePointer x; x=malloc(sizeof(struct node)); x->key=keydata; x->next=nil->next; x->prev=nil; nil->n...
main.c: In function 'insert': main.c:17:13: error: 'nil' undeclared (first use in this function) 17 | x->next=nil->next; | ^~~ main.c:17:13: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'delete': main.c:25:5: error: 'nil' undeclared ...
s223809686
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #define MAX 2000000000 #define MAX2 1000000 #define MAX3 2000000 struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int); void init(); void printList(); void ...
main.c: In function 'delete': main.c:122:3: error: expected ',' or ';' before 'if' 122 | if ( t == nil ) return; | ^~
s786970233
p02265
C
if(isf++>0)printf(" "); printf("%d",cur->key); cur=cur->next; } printf("\n"); } void delete(struct Node *t){ if(t==nil)return; t->prev->next=t->next; t->next->prev=t->prev; free(t); } void deletefirst(){ delete(nil->next); }void deletelast(){ delete(nil->prev); } void deletekey(int key){ d...
main.c:1:5: error: expected identifier or '(' before 'if' 1 | if(isf++>0)printf(" "); | ^~ main.c:2:12: error: expected declaration specifiers or '...' before string constant 2 | printf("%d",cur->key); | ^~~~ main.c:2:17: error: unknown type name 'cur' 2 | printf("%d",...
s036030653
p02265
C
#include<stdio.h> int main() { int a,b,i,j,Ya = 0,f, g, h; scanf("%d",&a); int a1[a]; char a2[12]; for(i = 0;i < a;i++){ scanf("%s %d",a2,&b); if(a2[0] == 'i') { a1[i] = b; } else if(a2[6] == 'F') { i -= 2; a -= 2; } else if(a[6]=='L') { ...
main.c: In function 'main': main.c:26:14: error: subscripted value is neither array nor pointer nor vector 26 | else if(a[6]=='L') | ^
s017833654
p02265
C
#include <stdio.h> #include <string.h> #include <stdlib.h> typedef struct Node* NodePointer; typedef struct Node { int k; NodePointer next, p; } Node; NodePointer head, last; NodePointer make_node(int k) { NodePointer tmp = malloc(sizeof(Node)); tmp->next = tmp->p = NULL; tmp->k = k; return tmp;...
main.c: In function 'init': main.c:25:7: error: 'struct Node' has no member named 'pre' 25 | last->pre = head; | ^~
s644149055
p02265
C
#include <stdio.h> #include <stdlib.h> typedef struct { int key; struct Node *pre,*next; }Node; Node *nil; void print(){ Node *a=nil->next; int i=1; while(1){ if(a==nil) break; if(i>0)printf(" "); printf("%d",a->next); a=a->next; } printf("\n"); } void renketu(){ nil=(Node *)mallo...
main.c: In function 'print': main.c:12:11: error: initialization of 'Node *' from incompatible pointer type 'struct Node *' [-Wincompatible-pointer-types] 12 | Node *a=nil->next; | ^~~ main.c:19:6: error: assignment to 'Node *' from incompatible pointer type 'struct Node *' [-Wincompatible-pointer-...
s188251579
p02265
C
#include<stdio.h> #include <iostream> #include <string.h> #include <cstdlib> using namespace std; #define BUF_SIZE 1024 struct Node{ int data; Node* prev; Node* next; }; class ConnectedList{ public: ConnectedList(){ motherNode = new Node(); motherNode->data = -1; motherNo...
main.c:2:10: fatal error: iostream: No such file or directory 2 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s246483022
p02265
C
#include<stdio.h> int main() { int n, w, i, j, y=0, f, g, h; scanf("%d", &n); int data[n]; char c[12]; for(i=0;i<n;i++){ scanf("%s %d", c, &w); if(c[0] == 'i'){ data[i]=w; } else if(c[6] == 'F'){ i-=2; n-=2; } else if(c[6] == 'L'){ i--; r--; ...
main.c: In function 'main': main.c:24:7: error: 'r' undeclared (first use in this function) 24 | r--; | ^ main.c:24:7: note: each undeclared identifier is reported only once for each function it appears in main.c:41:9: error: 'x' undeclared (first use in this function) 41 | x[j + h - 1]=...
s831905440
p02265
C
#include<stdio.h> int main() { int n, w, i, j, y=0, f, g, h; scanf("%d", &n); int data[n]; char c[12]; for(i = 0; i < n; i++){ scanf("%s %d", c, &w); if(c[0] == 'i'){ data[i]=w; } else if(c[6] == 'F'){ i -= 2; n -= 2; } else if(c[6] == 'L'){ i--; ...
main.c: In function 'main': main.c:53:11: error: expected ';' at end of input 53 | return 0 | ^ | ; 54 | main.c:53:3: error: expected declaration or statement at end of input 53 | return 0 | ^~~~~~
s845633577
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct list{ int key; struct list *next,*back; }; struct list *list; struct list * search(int key){ struct list *x = list->next; while(x!=list && x->key!=key) x = x->next; return x; } void init(){ list = (struct list *)malloc(si...
main.c: In function 'main': main.c:73:5: error: expected declaration or statement at end of input 73 | return 0; | ^~~~~~
s832081271
p02265
C
#include<stdio.h> int main() { int n, w, i, j, y=0, l, m, k; scanf("%d", &n); int data[n]; char c[12]; for(i = 0; i < n; i++){ scanf("%s %d", c, &w); if(c[0] == 'i'){ data[i]=w; } else if(c[6] == 'F'){ i -= 2; n -= 2; } else if(c[6] == 'L'){ i--; n--...
main.c: In function 'main': main.c:31:7: error: 'f' undeclared (first use in this function) 31 | f=0; | ^ main.c:31:7: note: each undeclared identifier is reported only once for each function it appears in
s349664277
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct Node{ int key; Node *next,*prev; }; Node *nil; Node* listsearch(int key){ Node *cur = nil->next; while(cur != nil && cur->key != key){ cur = cur->next; } return cur; } void init(void){ nil = (Node *)malloc(sizeof(Node)); nil->next =...
main.c:8:3: error: unknown type name 'Node' 8 | Node *next,*prev; | ^~~~ main.c:11:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type 11 | Node *nil; | ^~~~ | struct main.c:13:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type 13 | N...
s313345076
p02265
C
#include<stdio.h> int main() { int n, a, i, j, y=0, l, m, k; scanf("%d", &n); int data[n]; char c[12]; for(i = 0; i < n; i++){ scanf("%s %d", c, &a); if(c[0] == 'i'){ data[i]=w; } else if(c[6] == 'F') { i -= 2; n -= 2; } else if(c[6] == 'L') { i--...
main.c: In function 'main': main.c:14:15: error: 'w' undeclared (first use in this function) 14 | data[i]=w; | ^ main.c:14:15: note: each undeclared identifier is reported only once for each function it appears in
s537845448
p02265
C
#include<stdio.h> #include<stdlib.h> typedef struct { int key; Node *prev, *next; } Node; Node *nil; void init(){ nil = (Node *)malloc(sizeof(Node)); nil->prev = nil; nil->next = nil; } void insert(int key){ Node *x = (Node *)malloc(sizeof(Node)); x->key = key; x->next = nil->next; nil->next->prev...
main.c:6:3: error: unknown type name 'Node' 6 | Node *prev, *next; | ^~~~ main.c: In function 'init': main.c:13:13: error: assignment to 'int *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types] 13 | nil->prev = nil; | ^ main.c:14:13: error: assignment to 'int *...
s995176897
p02265
C
#include<stdio.h> #include<stdlib.h> typedef struct { int key; Node *prev, *next; } Node; Node *nil; void init(){ nil = (Node *)malloc(sizeof(Node)); nil->prev = nil; nil->next = nil; } void insert(int key){ Node *x = (Node *)malloc(sizeof(Node)); x->key = key; x->next = nil->next; (nil->next)->pr...
main.c:6:3: error: unknown type name 'Node' 6 | Node *prev, *next; | ^~~~ main.c: In function 'init': main.c:13:13: error: assignment to 'int *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types] 13 | nil->prev = nil; | ^ main.c:14:13: error: assignment to 'int *...
s017881242
p02265
C
#include<stdio.h> #include<stdlib.h> typedef struct { int key; sturct Node *prev, *next; } Node; Node *nil; void init(){ nil = (Node *)malloc(sizeof(Node)); nil->prev = nil; nil->next = nil; } void insert(int key){ Node *x = (Node *)malloc(sizeof(Node)); x->key = key; x->next = nil->next; nil->nex...
main.c:6:3: error: unknown type name 'sturct'; did you mean 'struct'? 6 | sturct Node *prev, *next; | ^~~~~~ | struct main.c:6:15: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token 6 | sturct Node *prev, *next; | ^ main.c: In function 'init': main.c:1...
s466009702
p02265
C
#include<stdio.h> #include<stdlib.h> typedef struct { int key; struct Node *prev, *next; } Node; Node *nil; void init(){ nil = (Node *)malloc(sizeof(Node)); nil->prev = nil; nil->next = nil; } void insert(int key){ Node *x = (Node *)malloc(sizeof(Node)); x->key = key; x->next = nil->next; nil->nex...
main.c: In function 'init': main.c:13:13: error: assignment to 'struct Node *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types] 13 | nil->prev = nil; | ^ main.c:14:13: error: assignment to 'struct Node *' from incompatible pointer type 'Node *' [-Wincompatible-pointer-types]...
s664800628
p02265
C
#include<stdio.h> #include<stdlib.h> struct node{ int key; struct Node *prev, *next; }; typedef struct node Node; Node *nil; void init(){ nil = (Node *)malloc(sizeof(Node)); nil->prev = nil; nil->next = nil; } void insert(int key){ Node *x = (Node *)malloc(sizeof(Node)); x->key = key; x->next = nil...
main.c: In function 'init': main.c:15:13: error: assignment to 'struct Node *' from incompatible pointer type 'Node *' {aka 'struct node *'} [-Wincompatible-pointer-types] 15 | nil->prev = nil; | ^ main.c:16:13: error: assignment to 'struct Node *' from incompatible pointer type 'Node *' {aka 'st...
s147434927
p02265
C
#include<stdio.h> #include<stdlib.h> struct node{ int key; struct node *prev, *next; }; typedef struct node Node; Node *nil; void init(){ nil = (Node *)malloc(sizeof(Node)); nil->prev = nil; nil->next = nil; } void insert(int key){ Node *x = (Node *)malloc(sizeof(Node)); x->key = key; x->next = nil...
main.c: In function 'main': main.c:78:22: error: expected ')' before ';' token 78 | while(c = nil->next;c != nil;c = c->next){ | ~ ^ | )
s595207777
p02265
C
#include<stdio.h> #include<conio.h> void insertAtBeginning(int); void insertAtEnd(int); void insertAtAfter(int,int); void deleteBeginning(); void deleteEnd(); void deleteSpecific(int); void display(); struct Node { int data; struct Node *previous, *next; }*head = NULL; void main() { int choice1, choice2, va...
main.c:2:9: fatal error: conio.h: No such file or directory 2 | #include<conio.h> | ^~~~~~~~~ compilation terminated.
s075770828
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct item { struct item *next; int value; } item; int main(void) { char s[100]; int n, val, i, j; item *itm, *itm1, *first = NULL; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%s", s); itm = first; if (strcmp(s, "insert") == 0) { ...
main.c: In function 'main': main.c:57:50: error: expected expression before '|' token 57 | } else printf("invalid %s\n", s);| | ^ main.c:64:1: error: expected declaration or statement at end of input 64 | } | ^
s420488153
p02265
C
#include <stdio.h> #include <string.h> #include <stdlib.h> typedef struct node *link; struct node{ int item; link next; }; int main(void){ int n, i, j, getitem, size = 0; char s[256]; link head; head = malloc(sizeof(*head)); head->item = -1; head->next = NULL; scanf("%d", &n); for(i = 0; i <...
main.c: In function 'main': main.c:88:31: error: 'next' undeclared (first use in this function) 88 | printf("%d ", x->next-->next->next->next->next->next->next->next>item); | ^~~~ main.c:88:31: note: each undeclared identifier is reported only once for each function it appea...
s539837014
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct DATA{ int data; struct DATA *next; struct DATA *before; }DATA, *link; link setList(link h){ h = (link)malloc(sizeof(struct DATA)); h->next = NULL; h->next = NULL; h->data = -1; return h; } link insert(link h,int key){ link x = (link)mallo...
main.c:79:16: error: expected declaration specifiers or '...' before string constant 79 | printf("\n"); | ^~~~ main.c:80:9: error: expected identifier or '(' before 'return' 80 | return; | ^~~~~~ main.c:81:1: error: expected identifier or '(' before '}' token ...
s026446480
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct node{ int num; struct node *prev; struct node *next; } List; List *insert(List *head, int x) { List *p; if((p=(List *)malloc(sizeof(List))) == NULL){ printf("malloc error\n"); exit(1); } p->num = x; p->prev = NULL; p->next=head; if(h...
main.c: In function 'deleteFirst': main.c:30:9: error: expected ';' before 'p' 30 | p=head->next; p->prev=NULL; | ^
s760163584
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct node{ int num; struct node *prev; struct node *next; } List; List *insert(List *head, int x) { List *p; if((p=(List *)malloc(sizeof(List))) == NULL){ printf("malloc error\n"); exit(1); } p->num = x; p->prev = NULL; p->next=head; if(h...
main.c:77:1: error: expected ',' or ';' before 'List' 77 | List *tail=head | ^~~~
s896341774
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct node{ int num; struct node *prev; struct node *next; } List; List *insert(List *head, int x) { List *p; if((p=(List *)malloc(sizeof(List))) == NULL){ printf("malloc error\n"); exit(1); } p->num = x; p->prev = NULL; p->next=head; if(h...
main.c:77:12: error: initializer element is not constant 77 | List *tail=head; | ^~~~ main.c: In function 'main': main.c:91:25: error: 'list' undeclared (first use in this function); did you mean 'List'? 91 | list=insert(head,x); | ^~~~ ...
s879688579
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct node{ int num; struct node *prev; struct node *next; } List; List *insert(List *head, int x) { List *p; if((p=(List *)malloc(sizeof(List))) == NULL){ printf("malloc error\n"); exit(1); } p->num = x; p->prev = NULL; p->next=head; if(h...
main.c:77:12: error: initializer element is not constant 77 | List *tail=head; | ^~~~
s211566502
p02265
C
include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct node{ int num; struct node *prev; struct node *next; } List; List *insert(List *head, int x) { List *p; if((p=(List *)malloc(sizeof(List))) == NULL){ printf("malloc error\n"); exit(1); } p->num = x; p->prev = NULL; p->next=head; if(he...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/stdlib.h:98:8: error: unknown type name 'size_t' 98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; | ^~~~~~ /usr/inclu...
s237957361
p02265
C
#include<stdipo.h> #include<stdlib.h> struct node{ int key; struct node *prev, *next; }; struct node *nil; void insert(int); void delete(struct node*); struct node* search(int); void listPrint(void); int main(){ int n,i,x; char str[15]; scanf("%d",&n); nil = (struct node*)malloc(sizeof(struct node)); nil...
main.c:1:9: fatal error: stdipo.h: No such file or directory 1 | #include<stdipo.h> | ^~~~~~~~~~ compilation terminated.
s237718334
p02265
C
#include <cstdio> #include <string> class List { int* data_; //[4000000]; int begin_; int end_; public: List() { data_ = new int[4000000]; begin_ = 2000000; end_ = 2000000; } // ~List() // { // delete[] data_; // } void Insert(int X) { ...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s628696477
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int key; struct Node *prev struct Node *next; }; struct Node *note; void insert(int key) { struct Node *x = (struct Node *)malloc(sizeof(struct Node)); x->key = key; note->next->prev = x; x->next = note->next; note->n...
main.c:7:9: error: expected ':', ',', ';', '}' or '__attribute__' before 'struct' 7 | struct Node *next; | ^~~~~~ main.c: In function 'insert': main.c:15:13: error: 'struct Node' has no member named 'next' 15 | note->next->prev = x; | ^~ main.c:16:6: error: 'struct...
s648627963
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int key; struct Node *prev struct Node *next; }; struct Node *note; void insert(int key) { struct Node *x = (struct Node *)malloc(sizeof(struct Node)); x->key = key; note->next->prev = x; x->next = note->next; note->n...
main.c:7:9: error: expected ':', ',', ';', '}' or '__attribute__' before 'struct' 7 | struct Node *next; | ^~~~~~ main.c: In function 'insert': main.c:15:13: error: 'struct Node' has no member named 'next' 15 | note->next->prev = x; | ^~ main.c:16:6: error: 'struct...
s949242518
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int key; struct Node *prev struct Node *next; }; struct Node *note; void insert(int key) { struct Node *x = (struct Node *)malloc(sizeof(struct Node)); x->key = key; note->next->prev = x; x->next = note->next; note->n...
main.c:7:9: error: expected ':', ',', ';', '}' or '__attribute__' before 'struct' 7 | struct Node *next; | ^~~~~~ main.c: In function 'insert': main.c:15:13: error: 'struct Node' has no member named 'next' 15 | note->next->prev = x; | ^~ main.c:16:6: error: 'struct...
s654046813
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int key; struct Node *prev struct Node *next; }; struct Node *note; void insert(int key) { struct Node *x = (struct Node *)malloc(sizeof(struct Node)); x->key = key; note->next->prev = x; x->next = note->next; note->n...
main.c:7:9: error: expected ':', ',', ';', '}' or '__attribute__' before 'struct' 7 | struct Node *next; | ^~~~~~ main.c: In function 'insert': main.c:15:13: error: 'struct Node' has no member named 'next' 15 | note->next->prev = x; | ^~ main.c:16:6: error: 'struct...
s124178831
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int key; struct Node *prev struct Node *next; }; struct Node *note; void insert(int key) { struct Node *x = (struct Node *)malloc(sizeof(struct Node)); x->key = key; note->next->prev = x; x->next = note->next; note->n...
main.c:7:9: error: expected ':', ',', ';', '}' or '__attribute__' before 'struct' 7 | struct Node *next; | ^~~~~~ main.c: In function 'insert': main.c:15:13: error: 'struct Node' has no member named 'next' 15 | note->next->prev = x; | ^~ main.c:16:6: error: 'struct...
s175300519
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int key; struct Node *prev struct Node *next; }; struct Node *note; void insert(int key) { struct Node *x = (struct Node *)malloc(sizeof(struct Node)); x->key = key; note->next->prev = x; x->next = note->next; note->n...
main.c:7:9: error: expected ':', ',', ';', '}' or '__attribute__' before 'struct' 7 | struct Node *next; | ^~~~~~ main.c: In function 'insert': main.c:15:13: error: 'struct Node' has no member named 'next' 15 | note->next->prev = x; | ^~ main.c:16:6: error: 'struct...
s936090173
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int key; struct Node *prev; struct Node *next; }; struct Node *note; void insert(int key) { struct Node *x = (struct Node *)malloc(sizeof(struct Node)); x->key = key; note->next->prev = x; x->next = note->next; note...
main.c: In function 'main': main.c:85:5: error: expected expression at end of input 85 | return | ^~~~~~ main.c:85:5: error: expected declaration or statement at end of input
s786665115
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int key; struct Node *prev; struct Node *next; }; struct Node *note; void init() { note = (struct Node *)malloc(sizeof(struct Node)); note->next = note; note->prev = note; } void insert(int key) { struct Node *x =...
main.c: In function 'main': main.c:90:5: error: expected expression at end of input 90 | return | ^~~~~~ main.c:90:5: error: expected declaration or statement at end of input
s885132285
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int key; struct Node *prev; struct Node *next; }; struct Node *note; void insert(int key) { struct Node *x = (struct Node *)malloc(sizeof(struct Node)); x->key = key; note->next->prev = x; x->next = note->next; note...
main.c: In function 'main': main.c:87:1: error: expected expression before '}' token 87 | } | ^
s615022963
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int key; struct Node *prev; struct Node *next; }; struct Node *note; void init() { note = (struct Node *)malloc(sizeof(struct Node)); note->next = note; note->prev = note; } void insert(int key) { struct Node *x =...
main.c: In function 'main': main.c:91:1: error: expected expression before '}' token 91 | } | ^
s902349890
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct Node{ int key; Node *prev, *next; }; Node *nil; void init(){ // ??????????????? nil = (Node*)malloc(sizeof(Node)); nil->next = nil; nil->prev = nil; } void insert(int key){ Node *x = (Node*)malloc(sizeof(Node)); x->key = k...
main.c:7:5: error: unknown type name 'Node' 7 | Node *prev, *next; | ^~~~ main.c:10:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type 10 | Node *nil; | ^~~~ | struct main.c: In function 'init': main.c:13:12: error: 'Node' undeclared (first use in this functi...
s758316188
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct node{ int key; node *prev; node *next; }Node; Node *nil; void init(){ // ??????????????? nil = (Node*)malloc(sizeof(Node)); nil->next = nil; nil->prev = nil; } void insert(int key){ Node *x = (Node*)malloc(sizeof(N...
main.c:7:5: error: unknown type name 'node' 7 | node *prev; | ^~~~ main.c:8:5: error: unknown type name 'node' 8 | node *next; | ^~~~ main.c: In function 'init': main.c:15:15: error: assignment to 'int *' from incompatible pointer type 'Node *' {aka 'struct node *'} [-Wincompatible-p...
s372710512
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int va; struct Node *prev; struct Node *next; }; struct Node *note; void insert(int va) { struct Node *x = (struct Node *)malloc(sizeof(struct Node)); x->va = va; note->next->prev = x; x->next = note->next; ...
main.c: In function 'deleteva': main.c:28:16: error: implicit declaration of function 'search'; did you mean 'bsearch'? [-Wimplicit-function-declaration] 28 | deleteNode(search(va)); | ^~~~~~ | bsearch main.c:28:16: error: passing argument 1 of 'deleteNode' makes pointer...
s604690259
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int va; struct Node *prev; struct Node *next; }; struct Node *note; void insert(int va) { struct Node *x = (struct Node *)malloc(sizeof(struct Node)); x->va = va; note->next->prev = x; x->next = note->next; ...
main.c: In function 'deleteva': main.c:28:16: error: implicit declaration of function 'search'; did you mean 'bsearch'? [-Wimplicit-function-declaration] 28 | deleteNode(search(va)); | ^~~~~~ | bsearch main.c:28:16: error: passing argument 1 of 'deleteNode' makes pointer...
s535885900
p02265
C
#include <string.h> #include <stdio.h> #include <stdlib.h> struct Node { int va; struct Node *prev; struct Node *next; }; struct Node *note; void insert(int va) { struct Node *x = (struct Node *)malloc(sizeof(struct Node)); x->va = va; note->next->prev = x; x->next = note->next; ...
main.c: In function 'deleteva': main.c:29:16: error: implicit declaration of function 'search'; did you mean 'bsearch'? [-Wimplicit-function-declaration] 29 | deleteNode(search(va)); | ^~~~~~ | bsearch main.c:29:16: error: passing argument 1 of 'deleteNode' makes pointer...
s380748441
p02265
C
include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct node {long int item; struct node *next;} link; link *insert(link *nxt,long int item){ link *A; A =malloc(sizeof(link)); A->item = item; A-> next =nxt; return A; } link *deleteFirst(link *B){ link *A; A=B->next; free(B); return A; } ...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ In file included from main.c:2: /usr/include/stdlib.h:98:8: error: unknown type name 'size_t' 98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; | ^~~~~~ /usr/inc...
s357867730
p02265
C
include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct node {long int item; struct node *next;} link; link *insert(link *nxt,long int item){ link *A; A =malloc(sizeof(link)); A->item = item; A-> next =nxt; return A; } link *deleteFirst(link *B){ link *A; A=B->next; free(B); return A; } ...
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include <stdio.h> | ^ In file included from main.c:2: /usr/include/stdlib.h:98:8: error: unknown type name 'size_t' 98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; | ^~~~~~ /usr/inc...
s079513066
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct node {long int item; struct node *next; struct node *prev} link; link *tail; tail=NULL; link *insert(link *nxt,long int item){ link *A; A =malloc(sizeof(link)); A->item = item; A-> next =nxt; if(nxt==NULL){ tail=A; } nxt-> prev =A; re...
main.c:6:73: warning: no semicolon at end of struct or union 6 | typedef struct node {long int item; struct node *next; struct node *prev} link; | ^ main.c:8:1: warning: data definition has no type or storage class 8 | tail=NULL; ...
s105966795
p02265
C
#include<stdio.h> #include<stdlib.h> struct node{ int key; struct node *prev, *next; }; struct node *nil; void insertFirst(int); void insertLast(int); void delete(struct node*); struct node* search(int); void listPrint(void); int main(){ int n,i,x; char str[15]; scanf("%d",&n); nil = (struct node*)malloc(s...
/usr/bin/ld: /tmp/cczmUIME.o: in function `main': main.c:(.text+0xe6): undefined reference to `insertLast' collect2: error: ld returned 1 exit status
s838755273
p02265
C
#include "stdio.h" #include "string.h" int buf[1000000]; int endBufIndex; char command_key_list[4][] = {"insert","delete","deleteFirst","deleteLast"}; void insert(int value, int index) { int i = index; if(index < 1) { while(i > 0) { buf[i] = bud[i-1]; } } buf[index] = value; endBufIndex++; } void de...
main.c:6:9: error: array type has incomplete element type 'char[]' 6 | char command_key_list[4][] = {"insert","delete","deleteFirst","deleteLast"}; | ^~~~~~~~~~~~~~~~ main.c:6:9: note: declaration of 'command_key_list' as multidimensional array must have bounds for all dimensions except the first m...
s820715829
p02265
C
#include <stdio.h> #include <string.h> #define MAX_COMMAND_NUM 2000000 #define MAX_LIST_NUM 1000000 typedef struct ST_LinkedList LinkedList_t; struct ST_LinkedList{ int key_value; /* Key Value */ LinkedList_t *before; /* Before Point */ LinkedList_t *next; /* Next Point */ }...
main.c: In function 'main': main.c:33:29: error: invalid type argument of '->' (have 'LinkedList_t' {aka 'struct ST_LinkedList'}) 33 | tLinkedListBuffer[0]->next = NULL; | ^~ main.c:34:29: error: invalid type argument of '->' (have 'LinkedList_t' {aka 'struct ST_LinkedList...
s373387786
p02265
C
#include <stdio.h> #include <cstdio> #include <cstdlib> #include <cstring> struct Node{ int key; Node *next, *prev; }; Node * nil; Node* listSearch(int key){ Node *cur = nil->next; while(cur != nil && cur->key != key){ cur = cur->next; } return cur; } void init(){ nil = (Node *)malloc(sizeof(Node)...
main.c:2:10: fatal error: cstdio: No such file or directory 2 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s257752675
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct Node { int nKey; Node* pNext, *pPrev; }; 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 = ...
main.c:8:9: error: unknown type name 'Node' 8 | Node* pNext, *pPrev; | ^~~~ main.c:11:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type 11 | Node* pNul; | ^~~~ | struct main.c: In function 'Init': main.c:15:17: error: 'Node' undeclared (first use in ...
s513631368
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct Nodes { int nKey; Nodes* pNext, *pPrev; }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; ...
main.c:8:9: error: unknown type name 'Nodes' 8 | Nodes* pNext, *pPrev; | ^~~~~ main.c: In function 'Init': main.c:16:21: error: assignment to 'int *' from incompatible pointer type 'Node *' {aka 'struct Nodes *'} [-Wincompatible-pointer-types] 16 | pNul->pNext = pNul; | ...
s869238031
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct node { int nKey; node* pNext, *pPrev; }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; pC...
main.c:8:9: error: unknown type name 'node' 8 | node* pNext, *pPrev; | ^~~~ main.c: In function 'Init': main.c:16:21: error: assignment to 'int *' from incompatible pointer type 'Node *' {aka 'struct node *'} [-Wincompatible-pointer-types] 16 | pNul->pNext = pNul; | ...
s380408419
p02265
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-...
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': ma...
s753265936
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> 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 = ...
main.c:8:9: error: unknown type name 'node' 8 | node* pNext, *pPrev; | ^~~~ 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 | ...
s170993735
p02265
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s475999238
p02265
C
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main(){ list<ll> l; list<ll> ::iterator it; int N; cin >> N; while(N--){ string op; cin >> op; int x; if(op == "insert"){ cin >> x; l.push_front(x); }else if(op == "delet...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s921364949
p02265
C
#include<stdio.h> int main(void){ int }
main.c: In function 'main': main.c:5:1: error: expected identifier or '(' before '}' token 5 | } | ^ main.c:5:1: error: expected declaration or statement at end of input
s522873509
p02265
C
#include<iostream> #include <sstream> #include <cstdlib> #include<list> using namespace std; int main(){ int n; list<int> L; char str[15]; scanf("%d",&n); for(int i=0,num;i<n;i++){ scanf("%s",str); if(str[0]=='i'){ scanf("%d",&num); L.push_front(num); } else if(str[6]=='F'){ ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s478681693
p02265
C
#include <iostream> #include <sstream> #include <cstdlib> #include<list> using namespace std; int main(){ int n; list<int> L; char str[15]; scanf("%d",&n); for(int i=0,num;i<n;i++){ scanf("%s",str); if(str[0]=='i'){ scanf("%d",&num); L.push_front(num); } else if(str[6]=='F'){ ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s987255032
p02265
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s717294687
p02265
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s546777579
p02265
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s199501490
p02265
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s577532367
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #define MAX 2000 typedef struct node { //データ// char command[MAX];//命令 int number;//数字 //データ// struct node *prev;//前へ struct node *next;//次へ }node; int main(void) { long charchar C_input[MAX],//commandに格納する文字列 instruction[4][12] = { "insert", "delete", ...
main.c: In function 'main': main.c:18:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'C_input' 18 | long charchar C_input[MAX],//commandに格納する文字列 | ^~~~~~~ main.c:18:23: error: 'C_input' undeclared (first use in this function); did you mean 'u_int'? 18 | ...
s444344339
p02265
C
##define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<string.h> #define MAX 200000 typedef struct node { //データ// char command[13];//命令 int number;//数字 //データ// struct node *prev;//前へ struct node *next;//次へ }node; int main(void) { char C_input[13],//commandに格納する文字列 instruction[4][12] ...
main.c:1:1: error: stray '##' in program 1 | ##define _CRT_SECURE_NO_WARNINGS | ^~ main.c:1:3: error: unknown type name 'define' 1 | ##define _CRT_SECURE_NO_WARNINGS | ^~~~~~ main.c:1:33: error: expected ';' before 'typedef' 1 | ##define _CRT_SECURE_NO_WARNINGS | ...
s746689263
p02265
C
##define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<string.h> #define MAX 20000 typedef struct node { //データ// char command[13];//命令 int number;//数字 //データ// struct node *prev;//前へ struct node *next;//次へ }node; int main(void) { char C_input[13],//commandに格納する文字列 instruction[4][12] =...
main.c:1:1: error: stray '##' in program 1 | ##define _CRT_SECURE_NO_WARNINGS | ^~ main.c:1:3: error: unknown type name 'define' 1 | ##define _CRT_SECURE_NO_WARNINGS | ^~~~~~ main.c:1:33: error: expected ';' before 'typedef' 1 | ##define _CRT_SECURE_NO_WARNINGS | ...
s993364676
p02265
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s497890209
p02265
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s748610551
p02265
C
##define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> #include<string.h> #define MAX 200 typedef struct node { //データ// char command[13];//命令 int number;//数字 //データ// struct node *prev;//前へ struct node *next;//次へ }node; int main(void) { char instruction[4][12] = { "insert", "delete", "deleteLast...
main.c:1:1: error: stray '##' in program 1 | ##define _CRT_SECURE_NO_WARNINGS | ^~ main.c:1:3: error: unknown type name 'define' 1 | ##define _CRT_SECURE_NO_WARNINGS | ^~~~~~ main.c:1:33: error: expected ';' before 'typedef' 1 | ##define _CRT_SECURE_NO_WARNINGS | ...
s790797832
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct list{ struct list *next; struct list *prev; int n; }; struct list *ls; void init(); void insert(int); void delete(int); void print(); void deleteFirst(); void deleteLast(); int main(){ int n,i,com; char command[13]; init(); scanf("%d",&n); ...
main.c: In function 'print': main.c:54:21: error: expected ';' before 'return' 54 | printf("\n") | ^ | ; 55 | return; | ~~~~~~
s633780140
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct list{ struct list *next; struct list *prev; int n; }; struct list *ls; void init(); void insert(int); void delete(int); void print(); void deleteFirst(); void deleteLast(); int main(){ int n,i,com; char command[13]; init(); scanf("%d",&n); ...
main.c: In function 'print': main.c:54:21: error: expected ';' before ':' token 54 | printf("\n"): | ^ | ;
s428114678
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct list{ struct list *next; struct list *prev; int n; }; struct list *ls; void init(); void insert(int); void delete(int); void print(); void deleteFirst(); void deleteLast(); int main(){ int n,i,com; char command[13]; init(); scanf("%d",&n); ...
main.c: In function 'deleteLast': main.c:82:13: error: 'struct list' has no member named 'preb'; did you mean 'prev'? 82 | ls->next->preb=ls->prev | ^~~~ | prev main.c:82:26: error: expected ';' before '}' token 82 | ls->next->preb=ls->prev | ...
s866923916
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct list{ struct list *next; struct list *prev; int n; }; struct list *ls; void init(); void insert(int); void delete(int); void print(); void deleteFirst(); void deleteLast(); int main(){ int n,i,com; char command[13]; init(); scanf("%d",&n); ...
main.c: In function 'deleteLast': main.c:82:13: error: 'struct list' has no member named 'preb'; did you mean 'prev'? 82 | ls->next->preb=ls->prev; | ^~~~ | prev
s531259126
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct list{ struct list *next; struct list *prev; int n; }; struct list *ls; void init(); void insert(int,int); void delete(int); void print(); void deleteFirst(); void deleteLast(); int main(){ int n,i,com; char command[13]; init(); scanf("%d",&...
main.c: In function 'deleteLast': main.c:82:7: error: expected identifier before '->' token 82 | ls->->prev=ls->prev; | ^~
s373185617
p02265
C
#include<iostream> using namespace std; struct Card { char suit, value; }; void bubble(struct Card A[],int N){ for(int i = 0; i < N; i++){ for(int j = N - 1; j >= i + 1; j--){ if(A[j].value < A[j - 1].value){ Card t = A[j]; A[j] = A[j - 1]; A[j - 1] = t; } } } } void selection(struct Card ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s989083207
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct Node{ int key; Node *next, *prev; }; Node *nil; Node* listSearch(int key){ Node *cur = nil->next; while(cur != nil && cur->key != key){ cur = cur->next; } return cur; } void init(){ nil = (Node *)malloc(sizeof(Node)); nil->next = ni...
main.c:7:3: error: unknown type name 'Node' 7 | Node *next, *prev; | ^~~~ main.c:10:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type 10 | Node *nil; | ^~~~ | struct main.c:12:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type 12 | ...
s537931312
p02265
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status