Borderou de evaluare (job #1108216)
Utilizator | Data | 15 februarie 2014 15:01:34 | |
---|---|---|---|
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 ‘int 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:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
user.cpp: In function ‘int main()’:
user.cpp:27:24: error: no matching function for call to ‘std::vector<int>::push_back()’
g[x].push_back();
^
user.cpp:27:24: 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:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(const value_type& __x)
^
/usr/local/include/c++/4.8.0/bits/stl_vector.h:901:7: note: candidate expects 1 argument, 0 provided
/usr/local/include/c++/4.8.0/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(value_type&& __x)
^
/usr/local/include/c++/4.8.0/bits/stl_vector.h:919:7: note: candidate expects 1 argument, 0 provided
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:30:24: error: no matching function for call to ‘std::vector<int>::push_back()’
g[y].push_back();
^
user.cpp:30:24: 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:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(const value_type& __x)
^
/usr/local/include/c++/4.8.0/bits/stl_vector.h:901:7: note: candidate expects 1 argument, 0 provided
/usr/local/include/c++/4.8.0/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(value_type&& __x)
^
/usr/local/include/c++/4.8.0/bits/stl_vector.h:919:7: note: candidate expects 1 argument, 0 provided
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !