Borderou de evaluare (job #2098122)
Utilizator | Iustinian Petrariu IustinPetrariu | Data | 2 ianuarie 2018 13:55:42 |
---|---|---|---|
Problema | Parcurgere DFS - componente conexe | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void BFS(int)’:
user.cpp:26:30: error: invalid conversion from ‘node*’ to ‘int’ [-fpermissive]
for(int q=p[Stiva[i]]; q!=NULL ; g=g->urm)
^
user.cpp:26:36: warning: NULL used in arithmetic [-Wpointer-arith]
for(int q=p[Stiva[i]]; q!=NULL ; g=g->urm)
^
user.cpp:26:43: error: ‘g’ was not declared in this scope
for(int q=p[Stiva[i]]; q!=NULL ; g=g->urm)
^
user.cpp:28:16: error: base operand of ‘->’ is not a pointer
w=q->x;
^
user.cpp:29:30: error: invalid types ‘int[int]’ for array subscript
if(ans[Stiva[i][w]]==-1)
^
user.cpp:23:11: warning: unused variable ‘q’ [-Wunused-variable]
node *q;
^
user.cpp: At global scope:
user.cpp:36:20: error: ‘nod’ has not been declared
void adauga(int x, nod*& pp)
^
user.cpp: In function ‘void adauga(int, int*&)’:
user.cpp:38:5: error: ‘nod’ was not declared in this scope
nod*q=new node;
^
user.cpp:38:9: error: ‘q’ was not declared in this scope
nod*q=new node;
^
user.cpp: In function ‘int main()’:
user.cpp:51:21: error: invalid initialization of reference of type ‘int*&’ from expression of type ‘node*’
adauga(y,p[x]);
^
user.cpp:36:6: error: in passing argument 2 of ‘void adauga(int, int*&)’
void adauga(int x, nod*& pp)
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !