Borderou de evaluare (job #1047689)
Utilizator | Data | 4 decembrie 2013 20:11:41 | |
---|---|---|---|
Problema | Pariuri | 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:26:15: error: cannot bind ‘std::basic_ostream<char>’ lvalue to ‘std::basic_ostream<char>&&’
cout<<i<<" "<<h[i]<<" ";
^
In file included from /usr/local/include/c++/4.8.0/istream:39:0,
from /usr/local/include/c++/4.8.0/fstream:38,
from user.cpp:1:
/usr/local/include/c++/4.8.0/ostream:602:5: error: initializing argument 1 of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = std::__detail::_Node_iterator<std::pair<const int, int>, false, false>]’
operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
^
user.cpp:26:24: error: no match for ‘operator[]’ (operand types are ‘std::unordered_map<int, int>’ and ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’)
cout<<i<<" "<<h[i]<<" ";
^
user.cpp:26:24: note: candidates are:
In file included from /usr/local/include/c++/4.8.0/unordered_map:48:0,
from user.cpp:3:
/usr/local/include/c++/4.8.0/bits/unordered_map.h:595:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<std::pair<const int, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = int]
operator[](const key_type& __k)
^
/usr/local/include/c++/4.8.0/bits/unordered_map.h:595:7: note: no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘const key_type& {aka const int&}’
/usr/local/include/c++/4.8.0/bits/unordered_map.h:599:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type&&) [with _Key = int; _Tp = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<std::pair<const int, int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = int]
operator[](key_type&& __k)
^
/usr/local/include/c++/4.8.0/bits/unordered_map.h:599:7: note: no known conversion for argument 1 from ‘std::__detail::_Node_iterator<std::pair<const int, int>, false, false>’ to ‘std::unordered_map<int, int>::key_type&& {aka int&&}’
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !