Borderou de evaluare (job #2740809)
Utilizator | Data | 14 aprilie 2021 13:38:40 | |
---|---|---|---|
Problema | Parcurgere DFS - componente conexe | Status | done |
Runda | Arhiva educationala | Compilator | c-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.c:10:2: error: unknown type name 'vertex'
vertex** neighbours;
^~~~~~
main.c: In function 'ReadFile':
main.c:39:36: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
graph.nodes[left - 1].neighbours = (vertex**)realloc(graph.nodes[left - 1].neighbours, (graph.nodes[left - 1].numNeighbours + 1) * sizeof(vertex*));
^
main.c:40:73: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
graph.nodes[left - 1].neighbours[graph.nodes[left - 1].numNeighbours] = graph.nodes+(right-1);
^
main.c:41:37: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
graph.nodes[right - 1].neighbours = (vertex**)realloc(graph.nodes[right - 1].neighbours, (graph.nodes[right - 1].numNeighbours + 1) * sizeof(vertex*));
^
main.c:42:75: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
graph.nodes[right - 1].neighbours[graph.nodes[right - 1].numNeighbours] = graph.nodes + (left - 1);
^
main.c: In function 'DFS':
main.c:55:50: error: request for member 'name' in something not a structure or union
if (!visited[graph.nodes[current].neighbours[i]->name-1])
^~
main.c:56:49: error: request for member 'name' in something not a structure or union
DFS(graph, graph.nodes[current].neighbours[i]->name-1);
^~
main.c: In function 'ReadFile':
main.c:25:2: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]
fscanf(fptr, "%d %d", &graph.numNodes, &graph.numEdges);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:38:3: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]
fscanf(fptr, "%d %d", &left, &right);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !