Borderou de evaluare (job #1935123)
Utilizator | Data | 22 martie 2017 00:33:19 | |
---|---|---|---|
Problema | Arbori indexati binar | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In constructor ‘AIB::AIB(std::vector<int>)’:
user.cpp:47:17: error: no match for ‘operator=’ (operand types are ‘std::vector<short int>’ and ‘std::vector<int>’)
m_array = std::vector<int>(list.size() + 1, 0);
^
user.cpp:47:17: 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 = short int; _Alloc = std::allocator<short int>]
vector<_Tp, _Alloc>::
^
/usr/include/c++/4.8/bits/vector.tcc:160:5: note: no known conversion for argument 1 from ‘std::vector<int>’ to ‘const std::vector<short 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 = short int; _Alloc = std::allocator<short 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 ‘std::vector<int>’ to ‘std::vector<short 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 = short int; _Alloc = std::allocator<short 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 ‘std::vector<int>’ to ‘std::initializer_list<short int>’
user.cpp:48:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int idx = 0; idx < list.size(); idx++)
^
user.cpp:53:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int idx = 1; idx < m_array.size(); idx++)
^
user.cpp:56:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (idx2 < m_array.size())
^
user.cpp: In member function ‘void AIB::update(int, int)’:
user.cpp:80:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (++idx; idx < m_array.size(); idx += idx & -idx)
^
user.cpp: In function ‘int main()’:
user.cpp:117:16: error: no matching function for call to ‘AIB::AIB(std::vector<short int>&)’
AIB myAIB(V);
^
user.cpp:117:16: note: candidates are:
user.cpp:45:5: note: AIB::AIB(std::vector<int>)
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !