Borderou de evaluare (job #1519332)

Utilizator Andrei66Andrei Rusu Andrei66 Data 7 noiembrie 2015 11:07:07
Problema Parcurgere DFS - componente conexe Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:18:17: error: conflicting declaration ‘std::vector<int> g [100005]’ vector<int> g[VM]; ^ user.cpp:15:10: error: ‘g’ has a previous declaration as ‘std::ofstream g’ ofstream g("dfs.out"); ^ user.cpp: In function ‘void dfs(int)’: user.cpp:23:27: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) for(unsigned int i=0; i<g[node].size(); ++i){ ^ user.cpp:24:16: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) int vecin = g[node][i]; ^ user.cpp: In function ‘int main()’: user.cpp:33:4: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) g[x].pb(y); ^ user.cpp:34:4: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) g[y].pb(x); ^

Ceva nu functioneaza?