Borderou de evaluare (job #2348815)

Utilizator Horea_Mihai_SilaghiHorea Mihai Silaghi Horea_Mihai_Silaghi Data 20 februarie 2019 00:13:05
Problema Parcurgere DFS - componente conexe Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:4:1: error: 'ifstream' does not name a type ifstream cin("dfs.in"); ^~~~~~~~ main.cpp:5:1: error: 'ofstream' does not name a type ofstream cin("dfs.out"); ^~~~~~~~ main.cpp: In function 'void citire()': main.cpp:24:5: error: 'cin' was not declared in this scope cin>>n>>m; ^~~ main.cpp: In function 'void dfs(int)': main.cpp:36:18: error: invalid conversion from 'pnod {aka nod*}' to 'int' [-fpermissive] for(int p=v[k];p!=NULL;p=p->a) ~~~^ main.cpp:36:23: warning: NULL used in arithmetic [-Wpointer-arith] for(int p=v[k];p!=NULL;p=p->a) ^~~~ main.cpp:36:31: error: base operand of '->' is not a pointer for(int p=v[k];p!=NULL;p=p->a) ^~ main.cpp:37:17: error: base operand of '->' is not a pointer if(viz[p->x]==0) ^~ main.cpp:38:18: error: base operand of '->' is not a pointer dfs(p->x); ^~ main.cpp:34:10: warning: unused variable 'p' [-Wunused-variable] pnod p=new nod; ^ main.cpp: In function 'int main()': main.cpp:51:5: error: 'cout' was not declared in this scope cout<<cnt; ^~~~ Non zero exit status: 1

Ceva nu functioneaza?