Borderou de evaluare (job #1108218)

Utilizator dr_personalityEftime Andrei Horatiu dr_personality Data 15 februarie 2014 15:03:39
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 dfs(int)’: user.cpp:13:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i<g[a].size(); i++) ^ user.cpp: In function ‘int main()’: user.cpp:28:13: error: no match for ‘operator[]’ (operand types are ‘std::vector<int>’ and ‘<unresolved overloaded function type>’) g[x][g[x].size] = y; ^ user.cpp:28:13: note: candidates are: In file included from /usr/local/include/c++/4.8.0/vector:64:0, from user.cpp:2: /usr/local/include/c++/4.8.0/bits/stl_vector.h:770:7: note: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = unsigned int] operator[](size_type __n) ^ /usr/local/include/c++/4.8.0/bits/stl_vector.h:770:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::vector<int>::size_type {aka unsigned int}’ /usr/local/include/c++/4.8.0/bits/stl_vector.h:785:7: note: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = unsigned int] operator[](size_type __n) const ^ /usr/local/include/c++/4.8.0/bits/stl_vector.h:785:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::vector<int>::size_type {aka unsigned int}’ user.cpp:31:13: error: no match for ‘operator[]’ (operand types are ‘std::vector<int>’ and ‘<unresolved overloaded function type>’) g[y][g[y].size] = x; ^ user.cpp:31:13: note: candidates are: In file included from /usr/local/include/c++/4.8.0/vector:64:0, from user.cpp:2: /usr/local/include/c++/4.8.0/bits/stl_vector.h:770:7: note: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::reference = int&; std::vector<_Tp, _Alloc>::size_type = unsigned int] operator[](size_type __n) ^ /usr/local/include/c++/4.8.0/bits/stl_vector.h:770:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::vector<int>::size_type {aka unsigned int}’ /usr/local/include/c++/4.8.0/bits/stl_vector.h:785:7: note: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::const_reference = const int&; std::vector<_Tp, _Alloc>::size_type = unsigned int] operator[](size_type __n) const ^ /usr/local/include/c++/4.8.0/bits/stl_vector.h:785:7: note: no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::vector<int>::size_type {aka unsigned int}’

Ceva nu functioneaza?