Borderou de evaluare (job #1109377)
Utilizator | Data | 17 februarie 2014 08:13:11 | |
---|---|---|---|
Problema | Sortare topologica | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void bfs()’:
user.cpp:18:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(i=0;i<graf[c[p]].size()&&v[graf[c[p]]]==0;i++)
^
user.cpp:18:39: error: no match for ‘operator[]’ (operand types are ‘int [50001]’ and ‘std::vector<int>’)
for(i=0;i<graf[c[p]].size()&&v[graf[c[p]]]==0;i++)
^
user.cpp:20:25: error: no match for ‘operator=’ (operand types are ‘std::vector<int>’ and ‘int’)
v[graf[c[p]]=1;
^
user.cpp:20:25: note: candidates are:
In file included from /usr/local/include/c++/4.8.0/vector:69:0,
from user.cpp:2:
/usr/local/include/c++/4.8.0/bits/vector.tcc:160:5: note: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = int; _Alloc = std::allocator<int>]
vector<_Tp, _Alloc>::
^
/usr/local/include/c++/4.8.0/bits/vector.tcc:160:5: note: no known conversion for argument 1 from ‘int’ to ‘const std::vector<int>&’
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:439:7: note: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = int; _Alloc = std::allocator<int>]
operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
^
/usr/local/include/c++/4.8.0/bits/stl_vector.h:439:7: note: no known conversion for argument 1 from ‘int’ to ‘std::vector<int>&&’
/usr/local/include/c++/4.8.0/bits/stl_vector.h:461:7: note: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = int; _Alloc = std::allocator<int>]
operator=(initializer_list<value_type> __l)
^
/usr/local/include/c++/4.8.0/bits/stl_vector.h:461:7: note: no known conversion for argument 1 from ‘int’ to ‘std::initializer_list<int>’
user.cpp:20:27: error: expected ‘]’ before ‘;’ token
v[graf[c[p]]=1;
^
user.cpp:14:11: warning: unused variable ‘j’ [-Wunused-variable]
int i,j,p,u,a;
^
user.cpp:14:15: warning: unused variable ‘u’ [-Wunused-variable]
int i,j,p,u,a;
^
user.cpp: In function ‘int main()’:
user.cpp:34:19: warning: unused variable ‘grad’ [-Wunused-variable]
int n,m,i,a,b,grad,j;
^
user.cpp:34:24: warning: unused variable ‘j’ [-Wunused-variable]
int n,m,i,a,b,grad,j;
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !