Borderou de evaluare (job #797095)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Gadfadăr (clasa 6-7) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 23 nov. 2024 15:00:24 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:29:40: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<std::__cxx11::basic_string<char>, long long unsigned int> >, std::pair<std::__cxx11::basic_string<char>, long long unsigned int> >::value_type' {aka 'std::pair<std::__cxx11::basic_string<char>, long long unsigned int>'} and '<brace-enclosed initializer list>')
29 | intrusi_data[i] = {nume, id, nr};
| ^
In file included from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_algobase.h:64,
from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/algorithm:60,
from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/i686-pc-linux-gnu/bits/stdc++.h:51,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_pair.h:752:9: note: candidate: 'template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, const _U1&>, std::is_assignable<_T2&, const _U2&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U2 = _U1; _T1 = std::__cxx11::basic_string<char>; _T2 = long long unsigned int]'
752 | operator=(const pair<_U1, _U2>& __p)
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_pair.h:752:9: note: template argument deduction/substitution failed:
main.cpp:29:40: note: couldn't deduce template parameter '_U1'
29 | intrusi_data[i] = {nume, id, nr};
| ^
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_pair.h:763:9: note: candidate: 'template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, _U1&&>, std::is_assignable<_T2&, _U2&&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U2 = _U1; _T1 = std::__cxx11::basic_string<char>; _T2 = long long unsigned int]'
763 | operator=(pair<_U1, _U2>&& __p)
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_pair.h:763:9: note: template argument deduction/substitution failed:
main.cpp:29:40: note: couldn't deduce template parameter '_U1'
29 | intrusi_data[i] = {nume, id, nr};
| ^
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_pair.h:727:7: note: candidate: 'std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::__conditional_t<std::__and_<std::is_copy_assignable<_T1>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch&>) [with _T1 = std::__cxx11::basic_string<char>; _T2 = long long unsigned int; std::__conditional_t<std::__and_<std::is_copy_assignable<_T1>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch&> = const std::pair<std::__cxx11::basic_string<char>, long long unsigned int>&]'
727 | operator=(__conditional_t<__and_<is_copy_assignable<_T1>,
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_pair.h:729:65: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::__conditional_t<true, const std::pair<std::__cxx11::basic_string<char>, long long unsigned int>&, const std::__nonesuch&>' {aka 'const std::pair<std::__cxx11::basic_string<char>, long long unsigned int>&'}
727 | operator=(__conditional_t<__and_<is_copy_assignable<_T1>,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
728 | is_copy_assignable<_T2>>::value,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
729 | const pair&, const __nonesuch&> __p)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_pair.h:737:7: note: candidate: 'std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(std::__conditional_t<std::__and_<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::__nonesuch&&>) [with _T1 = std::__cxx11::basic_string<char>; _T2 = long long unsigned int; std::__conditional_t<std::__and_<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::__nonesuch&&> = std::pair<std::__cxx11::basic_string<char>, long long unsigned int>&&]'
737 | operator=(__conditional_t<__and_<is_move_assignable<_T1>,
| ^~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_pair.h:739:55: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::__conditional_t<true, std::pair<std::__cxx11::basic_string<char>, long long unsigned int>&&, std::__nonesuch&&>' {aka 'std::pair<std::__cxx11::basic_string<char>, long long unsigned int>&&'}
737 | operator=(__conditional_t<__and_<is_move_assignable<_T1>,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
738 | is_move_assignable<_T2>>::value,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
739 | pair&&, __nonesuch&&> __p)
| ~~~~~~~~~~~~~~~~~~~~~~^~~
main.cpp:38:43: error: 'struct std::pair<std::__cxx11::basic_string<char>, long long unsigned int>' has no member named 'third'
38 | if (suma_div[data.second] != data.third) {
| ^~~~~