Borderou de evaluare (job #2594888)
Utilizator | Data | 6 aprilie 2020 18:57:52 | |
---|---|---|---|
Problema | Sortare topologica | Status | done |
Runda | laborator_7_sd_313cab | Compilator | c-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c: In function 'add_edge_list_graph':
main.c:30:5: warning: implicit declaration of function 'add_nth_node' [-Wimplicit-function-declaration]
add_nth_node(graph->neighbors[src], (1 <<30), dest);
^~~~~~~~~~~~
main.c: In function 'dfs_topo_sort':
main.c:37:9: error: unknown type name 'Node'
for(Node* it = lg->neighbors[x]->head; it; it = it->next){
^~~~
main.c:37:9: note: use 'struct' keyword to refer to the type
main.c:37:20: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
for(Node* it = lg->neighbors[x]->head; it; it = it->next){
^~
main.c:37:55: error: request for member 'next' in something not a structure or union
for(Node* it = lg->neighbors[x]->head; it; it = it->next){
^~
main.c:38:29: error: request for member 'data' in something not a structure or union
dfs_topo_sort(lg, it->data, visited, result);
^~
main.c: In function 'topo_sort':
main.c:49:25: error: 'i' undeclared (first use in this function)
dfs_topo_sort(lg, i, visited, ind, &n);
^
main.c:49:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:49:43: error: 'n' undeclared (first use in this function)
dfs_topo_sort(lg, i, visited, ind, &n);
^
main.c:49:37: warning: passing argument 4 of 'dfs_topo_sort' from incompatible pointer type [-Wincompatible-pointer-types]
dfs_topo_sort(lg, i, visited, ind, &n);
^~~
main.c:33:6: note: expected 'LinkedList * {aka struct <anonymous> *}' but argument is of type 'int *'
void dfs_topo_sort(ListGraph *lg, int *node, int *visited, LinkedList *result) {
^~~~~~~~~~~~~
main.c:49:7: error: too many arguments to function 'dfs_topo_sort'
dfs_topo_sort(lg, i, visited, ind, &n);
^~~~~~~~~~~~~
main.c:33:6: note: declared here
void dfs_topo_sort(ListGraph *lg, int *node, int *visited, LinkedList *result) {
^~~~~~~~~~~~~
main.c:150:5: warning: 'main' is normally a non-static function [-Wmain]
int main() {
^~~~
main.c: In function 'main':
main.c:151:46: error: incompatible types when assigning to type 'FILE {aka struct _IO_FILE}' from type 'FILE * {aka struct _IO_FILE *}'
FILE *in = fopen("sortaret.in", "rt"); *out = fopen("sortaret.out", "wt");
^
main.c: In function 'topo_sort':
main.c:166:1: error: expected declaration or statement at end of input
}
^
At top level:
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !