Borderou de evaluare (job #789489)

Utilizator avatar x_____Robert___x Nani Robert x_____Robert___x IP ascuns
Problemă Asort (baraj gimnaziu) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 10 oct. 2024 23:10:16 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:11:12: error: no match for 'operator+' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int') 11 | s=s+i; | ~^~ | | | | | int | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_algobase.h:67, 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_iterator.h:634:5: note: candidate: 'template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)' 634 | operator+(typename reverse_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:634:5: note: template argument deduction/substitution failed: main.cpp:11:13: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 11 | s=s+i; | ^ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:1808:5: note: candidate: 'template<class _Iterator> std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)' 1808 | operator+(typename move_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/stl_iterator.h:1808:5: note: template argument deduction/substitution failed: main.cpp:11:13: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 11 | s=s+i; | ^ In file included from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/string:54, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bitset:52, from /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/i686-pc-linux-gnu/bits/stdc++.h:52: /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3553:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3553 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3553:5: note: template argument deduction/substitution failed: main.cpp:11:13: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'int' 11 | s=s+i; | ^ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3571:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3571 | operator+(const _CharT* __lhs, | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3571:5: note: template argument deduction/substitution failed: main.cpp:11:13: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_string<char>' 11 | s=s+i; | ^ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3590:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3590 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs) | ^~~~~~~~ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3590:5: note: template argument deduction/substitution failed: main.cpp:11:13: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'int' 11 | s=s+i; | ^ /usr/lib/gcc/i686-pc-linux-gnu/13/include/g++-v13/bits/basic_string.h:3607:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)'