Borderou de evaluare (job #1805678)

Utilizator ArkinyStoica Alex Arkiny Data 14 noiembrie 2016 00:43:50
Problema Sortare prin comparare Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘void initialise_heap(node_heap**, int)’: user.cpp:98:46: error: ‘malloc’ was not declared in this scope *root = (node_heap*)malloc(sizeof(node_heap)); ^ user.cpp: In function ‘void add_to_heap(node_heap*, int)’: user.cpp:112:68: error: ‘malloc’ was not declared in this scope node_heap *temp_node_heap = (node_heap*)malloc(sizeof(node_heap)); ^ user.cpp:127:68: error: ‘malloc’ was not declared in this scope node_heap *temp_node_heap = (node_heap*)malloc(sizeof(node_heap)); ^ user.cpp: In function ‘void add_to_list(node_list**, int)’: user.cpp:159:53: error: ‘malloc’ was not declared in this scope node_list *p = (node_list*)malloc(sizeof(node_list)); ^ user.cpp: In function ‘void remove_first_list(node_list**)’: user.cpp:170:9: error: ‘free’ was not declared in this scope free(p); ^ user.cpp: In function ‘void DFS(node_list**, int*, int)’: user.cpp:229:25: error: cannot convert ‘node_list*’ to ‘node_list**’ for argument ‘1’ to ‘void remove_first_list(node_list**)’ remove_first_list(V[t]); ^ user.cpp: In function ‘void BFS(node_list**, int, int*, int)’: user.cpp:235:46: error: ‘malloc’ was not declared in this scope int *queue = (int*)malloc(sizeof(int) * size); ^ user.cpp:249:36: error: cannot convert ‘node_list*’ to ‘node_list**’ for argument ‘1’ to ‘int get_first_elem_list(node_list**)’ el = get_first_elem_list(V[node]); ^ user.cpp:257:30: error: cannot convert ‘node_list*’ to ‘node_list**’ for argument ‘1’ to ‘void remove_first_list(node_list**)’ remove_first_list(V[node]); ^ user.cpp:264:12: error: ‘free’ was not declared in this scope free(queue); ^ user.cpp: At global scope: user.cpp:285:30: error: redefinition of ‘int N’ int N, h[500010], v[500010], N; ^ user.cpp:285:5: error: ‘int N’ previously declared here int N, h[500010], v[500010], N; ^ user.cpp: In function ‘int main()’: user.cpp:292:22: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(in, "%d", &N); ^ user.cpp:294:26: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(in, "%d", &h[i]); ^

Ceva nu functioneaza?