Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin>>S;
  if(S.size()==1){
    int n = stoi(S);
    cout<<n;
  }
  else{
  vector<string> op; 
  op = {,+}; 
  vector<string> score();
  
  for(int i;i<S.size();i++){
    for(int j=0;j<2;j++){
      if(i<S.size-1){
    score+=S.at(i)+op.at(j);
      }
      else{
        score+=S.at(i);
      }
    }
  }
    
    
    
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected primary-expression before ',' token
   13 |   op = {,+};
      |         ^
a.cc:13:11: error: expected primary-expression before '}' token
   13 |   op = {,+};
      |           ^
a.cc:13:11: error: no match for 'operator=' (operand types are 'std::vector<std::__cxx11::basic_string<char> >' and '<brace-enclosed initializer list>')
In file included from /usr/include/c++/14/vector:72,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/vector.tcc:210:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
  210 |     vector<_Tp, _Alloc>::
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/vector.tcc:211:42: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const std::vector<std::__cxx11::basic_string<char> >&'
  211 |     operator=(const vector<_Tp, _Alloc>& __x)
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:766:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:766:26: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::__cxx11::basic_string<char> >&&'
  766 |       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
      |                 ~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:788:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
  788 |       operator=(initializer_list<value_type> __l)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:788:46: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::__cxx11::basic_string<char> >'
  788 |       operator=(initializer_list<value_type> __l)
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
a.cc:14:23: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   14 |   vector<string> score();
      |                       ^~
a.cc:14:23: note: remove parentheses to default-initialize a variable
   14 |   vector<string> score();
      |                       ^~
      |                       --
a.cc:18:14: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   18 |       if(i<S.size-1){
      |            ~~^~~~
      |                  ()
a.cc:19:10: error: no match for 'operator+=' (operand types are 'std::vector<std::__cxx11::basic_string<char> >()' and 'std::__cxx11::basic_string<char>')
   19 |     score+=S.at(i)+op.at(j);
      |     ~~~~~^~~~~~~~~~~~~~~~~~
a.cc:22:14: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   22 |         score+=S.at(i);
      |         ~~~~~^~~~~~~~~
a.cc:22:14: error: assignment of read-only location 'score'