Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string S; cin>>S;
  queue<char>A;
  for(int i=0;i<S.size();i++){
    if(S.at(i)=='0')A.push("0");
    else if(S.at(i)=='1')A.push("1");
    else if(!A.empty())A.pop();
  }
  for(i:A){
    cout<<A.front();
    A.pop();
  }
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: no matching function for call to 'push(const char [2])'
    7 |     if(S.at(i)=='0')A.push("0");
      |                     ~~~~~~^~~~~
In file included from /usr/include/c++/14/queue:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_queue.h:283:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = char; _Sequence = std::deque<char, std::allocator<char> >; value_type = char]' (near match)
  283 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:283:7: note:   conversion of argument 1 would be ill-formed:
a.cc:7:28: error: invalid conversion from 'const char*' to 'std::queue<char>::value_type' {aka 'char'} [-fpermissive]
    7 |     if(S.at(i)=='0')A.push("0");
      |                            ^~~
      |                            |
      |                            const char*
/usr/include/c++/14/bits/stl_queue.h:288:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(value_type&&) [with _Tp = char; _Sequence = std::deque<char, std::allocator<char> >; value_type = char]' (near match)
  288 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:288:7: note:   conversion of argument 1 would be ill-formed:
a.cc:7:28: error: invalid conversion from 'const char*' to 'std::queue<char>::value_type' {aka 'char'} [-fpermissive]
    7 |     if(S.at(i)=='0')A.push("0");
      |                            ^~~
      |                            |
      |                            const char*
a.cc:8:32: error: no matching function for call to 'push(const char [2])'
    8 |     else if(S.at(i)=='1')A.push("1");
      |                          ~~~~~~^~~~~
/usr/include/c++/14/bits/stl_queue.h:283:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = char; _Sequence = std::deque<char, std::allocator<char> >; value_type = char]' (near match)
  283 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:283:7: note:   conversion of argument 1 would be ill-formed:
a.cc:8:33: error: invalid conversion from 'const char*' to 'std::queue<char>::value_type' {aka 'char'} [-fpermissive]
    8 |     else if(S.at(i)=='1')A.push("1");
      |                                 ^~~
      |                                 |
      |                                 const char*
/usr/include/c++/14/bits/stl_queue.h:288:7: note: candidate: 'void std::queue<_Tp, _Sequence>::push(value_type&&) [with _Tp = char; _Sequence = std::deque<char, std::allocator<char> >; value_type = char]' (near match)
  288 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:288:7: note:   conversion of argument 1 would be ill-formed:
a.cc:8:33: error: invalid conversion from 'const char*' to 'std::queue<char>::value_type' {aka 'char'} [-fpermissive]
    8 |     else if(S.at(i)=='1')A.push("1");
      |                                 ^~~
      |                                 |
      |                                 const char*
a.cc:11:8: error: found ':' in nested-name-specifier, expected '::'
   11 |   for(i:A){
      |        ^
      |        ::
a.cc:11:7: error: 'i' has not been declared
   11 |   for(i:A){
      |       ^
a.cc:16:1: error: expected primary-expression before '}' token
   16 | }
      | ^
a.cc:15:14: error: expected ')' before '}' token
   15 |   cout<<endl;
      |              ^
      |              )
   16 | }
      | ~             
a.cc:11:6: note: to match this '('
   11 |   for(i:A){
      |      ^
a.cc:16:1: error: expected primary-expression before '}' token
   16 | }
      | ^