Borderou de evaluare (job #1687664)

Utilizator ArkinyStoica Alex Arkiny Data 13 aprilie 2016 00:06:44
Problema Sortare prin comparare Status done
Runda Arhiva educationala Compilator c | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.c: In function ‘set_insert’: user.c:110:3: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration] (*root) = malloc(sizeof(set_node)); //Allocating size for the set ^ user.c:110:13: warning: incompatible implicit declaration of built-in function ‘malloc’ [enabled by default] (*root) = malloc(sizeof(set_node)); //Allocating size for the set ^ user.c:131:4: error: too many arguments to function ‘cmp’ if (cmp(x->value, elem, size) >= 0) ^ user.c:133:4: error: too many arguments to function ‘cmp’ else if (cmp(x->value, elem, size) < 0) ^ user.c:137:7: warning: incompatible implicit declaration of built-in function ‘malloc’ [enabled by default] x = malloc(sizeof(set_node)); ^ user.c:148:3: error: too many arguments to function ‘cmp’ if (cmp(y->value, elem, size) >= 0) ^ user.c: At top level: user.c:236:6: error: conflicting types for ‘set_delete’ void set_delete(set_node *set, void *elem, int size, int(*cmp)(void*, void*)) ^ user.c:30:6: note: previous declaration of ‘set_delete’ was here void set_delete(set_node *set, void *elem, int size, int(*cmp)(const void*, const void*)); ^ user.c:241:5: error: conflicting types for ‘set_search’ int set_search(set_node *set, void *elem, int size, int(*cmp)(void*, void*)) ^ user.c:33:5: note: previous declaration of ‘set_search’ was here int set_search(set_node *set, void *elem, int size, int(*cmp)(const void*, const void*)); ^ user.c: In function ‘set_search’: user.c:244:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ user.c: In function ‘main’: user.c:278:8: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(in,"%d", &n); ^ user.c:284:9: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(in,"%d", &el); ^

Ceva nu functioneaza?