Borderou de evaluare (job #1842552)
Utilizator | Data | 7 ianuarie 2017 09:32:10 | |
---|---|---|---|
Problema | Granita | 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:13:13: error: no match for ‘operator=’ (operand types are ‘std::pair<int, int>’ and ‘long long int’)
maxi=LLONG_MIN;
^
user.cpp:13:13: note: candidates are:
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/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:158:7: note: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_T1, _T2>&) [with _T1 = int; _T2 = int]
operator=(const pair& __p)
^
/usr/include/c++/4.8/bits/stl_pair.h:158:7: note: no known conversion for argument 1 from ‘long long int’ to ‘const std::pair<int, int>&’
/usr/include/c++/4.8/bits/stl_pair.h:166:7: note: std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_T1, _T2>&&) [with _T1 = int; _T2 = int]
operator=(pair&& __p)
^
/usr/include/c++/4.8/bits/stl_pair.h:166:7: note: no known conversion for argument 1 from ‘long long int’ to ‘std::pair<int, int>&&’
/usr/include/c++/4.8/bits/stl_pair.h:177:2: note: template<class _U1, class _U2> std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]
operator=(const pair<_U1, _U2>& __p)
^
/usr/include/c++/4.8/bits/stl_pair.h:177:2: note: template argument deduction/substitution failed:
user.cpp:13:13: note: mismatched types ‘const std::pair<_T1, _T2>’ and ‘long long int’
maxi=LLONG_MIN;
^
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/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:186:2: note: template<class _U1, class _U2> std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]
operator=(pair<_U1, _U2>&& __p)
^
/usr/include/c++/4.8/bits/stl_pair.h:186:2: note: template argument deduction/substitution failed:
user.cpp:13:13: note: mismatched types ‘std::pair<_T1, _T2>’ and ‘long long int’
maxi=LLONG_MIN;
^
user.cpp:24:21: error: no match for ‘operator<’ (operand types are ‘std::pair<int, int>’ and ‘int’)
if (maxi<v[i].second)
^
user.cpp:24:21: note: candidates are:
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/istream:38,
from /usr/include/c++/4.8/fstream:38,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_pair.h:220:5: note: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !