Borderou de evaluare (job #1394799)
Utilizator | Data | 20 martie 2015 18:19:04 | |
---|---|---|---|
Problema | Proc2 | 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:41:14: error: no match for ‘operator=’ (operand types are ‘pereche {aka std::pair<int, int>}’ and ‘int’)
lb[i]=i;
^
user.cpp:41:14: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/vector:60,
from user.cpp:3:
/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 ‘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 ‘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:41:14: note: mismatched types ‘const std::pair<_T1, _T2>’ and ‘int’
lb[i]=i;
^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/vector:60,
from user.cpp:3:
/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:41:14: note: mismatched types ‘std::pair<_T1, _T2>’ and ‘int’
lb[i]=i;
^
user.cpp:47:28: error: no match for ‘operator[]’ (operand types are ‘int [100005]’ and ‘pereche {aka std::pair<int, int>}’)
while(n_ocupat>0&&t[oc[1]]<=a)
^
user.cpp:49:14: error: cannot convert ‘pereche {aka std::pair<int, int>}’ to ‘int’ in assignment
x=oc[1];
^
user.cpp:52:24: error: no match for ‘operator=’ (operand types are ‘pereche {aka std::pair<int, int>}’ and ‘int’)
lb[n_liber]=x;
^
user.cpp:52:24: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0,
from /usr/include/c++/4.8/vector:60,
from user.cpp:3:
/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 ‘int’ to ‘const std::pair<int, int>&’
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !