Borderou de evaluare (job #2065522)
Utilizator | Data | 13 noiembrie 2017 20:57:24 | |
---|---|---|---|
Problema | Fractii | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:21:35: error: no match for ‘operator=’ (operand types are ‘std::vector<int>’ and ‘int’)
phi[i] = i-1;
^
user.cpp:21:35: note: candidates are:
In file included from /usr/include/c++/4.8/vector:69:0,
from user.cpp:4:
/usr/include/c++/4.8/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/include/c++/4.8/bits/vector.tcc:160:5: note: no known conversion for argument 1 from ‘int’ to ‘const std::vector<int>&’
In file included from /usr/include/c++/4.8/vector:64:0,
from user.cpp:4:
/usr/include/c++/4.8/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/include/c++/4.8/bits/stl_vector.h:439:7: note: no known conversion for argument 1 from ‘int’ to ‘std::vector<int>&&’
/usr/include/c++/4.8/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/include/c++/4.8/bits/stl_vector.h:461:7: note: no known conversion for argument 1 from ‘int’ to ‘std::initializer_list<int>’
user.cpp:25:44: error: no match for ‘operator-=’ (operand types are ‘std::vector<int>’ and ‘std::vector<int>’)
phi[j] -= phi[i];
^
user.cpp:28:30: error: no match for ‘operator+=’ (operand types are ‘long long int’ and ‘std::vector<int>’)
nr+=phi[i];
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !