Borderou de evaluare (job #1549433)
Utilizator | Data | 12 decembrie 2015 12:26:16 | |
---|---|---|---|
Problema | Muzeu | 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:43:57: error: no matching function for call to ‘make_pair(int&, int&)’
l.push_back(make_pair<int, int>(i, j));
^
user.cpp:43:57: note: candidate is:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
make_pair(_T1&& __x, _T2&& __y)
^
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template argument deduction/substitution failed:
user.cpp:43:57: note: cannot convert ‘i’ (type ‘int’) to type ‘int&&’
l.push_back(make_pair<int, int>(i, j));
^
user.cpp:56:53: error: no matching function for call to ‘make_pair(int, int&)’
l.push_back(make_pair<int, int>(i - 1, j));
^
user.cpp:56:53: note: candidate is:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
make_pair(_T1&& __x, _T2&& __y)
^
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template argument deduction/substitution failed:
user.cpp:56:53: note: cannot convert ‘j’ (type ‘int’) to type ‘int&&’
l.push_back(make_pair<int, int>(i - 1, j));
^
user.cpp:60:53: error: no matching function for call to ‘make_pair(int, int&)’
l.push_back(make_pair<int, int>(i + 1, j));
^
user.cpp:60:53: note: candidate is:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/bits/char_traits.h:39,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
make_pair(_T1&& __x, _T2&& __y)
^
/usr/include/c++/4.8/bits/stl_pair.h:276:5: note: template argument deduction/substitution failed:
user.cpp:60:53: note: cannot convert ‘j’ (type ‘int’) to type ‘int&&’
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !