Borderou de evaluare (job #1819829)
Utilizator | Data | 30 noiembrie 2016 21:05:38 | |
---|---|---|---|
Problema | Sortare prin comparare | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:34:6: error: no match for ‘operator=’ (operand types are ‘std::vector<int>’ and ‘int*’)
v=new int[n+5];
^
user.cpp:34:6: note: candidates are:
In file included from /usr/include/c++/4.8/vector:69:0,
from /usr/include/c++/4.8/bits/random.h:34,
from /usr/include/c++/4.8/random:50,
from /usr/include/c++/4.8/bits/stl_algo.h:65,
from /usr/include/c++/4.8/algorithm:62,
from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
from user.cpp:1:
/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 /usr/include/c++/4.8/bits/random.h:34,
from /usr/include/c++/4.8/random:50,
from /usr/include/c++/4.8/bits/stl_algo.h:65,
from /usr/include/c++/4.8/algorithm:62,
from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64,
from user.cpp:1:
/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>’
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !