criyle/codenet-compile-errors huggingface dataset:
Language: C++

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

int main() {
    vector<string> v;
    string s, s1;
    cin >> s;
    for (int i=0; i<s.size(); i++) {
        if (s[i] == '1' || s[i] == '0')
            v.push_back(s[i]);
        if (s[i] == 'B' && v.size() > 0)
            v.pop_back();
    }
    for (int i=0; i<v.size(); i++)
        s1 += v[i];
    cout << s1;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::push_back(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   10 |             v.push_back(s[i]);
      |             ~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/vector:66,
                 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/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; value_type = std::__cxx11::basic_string<char>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::vector<std::__cxx11::basic_string<char> >::value_type&' {aka 'const std::__cxx11::basic_string<char>&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; value_type = std::__cxx11::basic_string<char>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::vector<std::__cxx11::basic_string<char> >::value_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
Language: C++

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

int main() {
	string S;
	cin >> S;

	string answer = 0;
	for (int i = 0; i < S.size(); i++) {
		if (S[i] == 0) {
			answer.push_back(0);
		}
		else if (S[i] == 1) {
			answer.push_back(1);
		}
		else if (S[i] == 'B') {
			answer.pop_back;
			if (answer == " ") {
				continue;
			}
		}
	}
	cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:32: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   17 |                         answer.pop_back;
      |                         ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
Language: C++

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

int main() {
	string S;
	cin >> S;

	string answer = 0;
	for (int i = 0; i < S.size(); i++) {
		if (S[i] == 0) {
			answer.push_back(0);
		}
		else if (S[i] == 1) {
			answer.push_back(1);
		}
		else if (S[i] == 'B') {
			answer.pop_back;
			if (answer == " ") {
				continue;
			}
		}
	}
	cout << answer << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:17:32: error: invalid use of non-static member function 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
   17 |                         answer.pop_back;
      |                         ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
a.cc:23:32: error: expected '}' at end of input
   23 |         cout << answer << endl;
      |                                ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

#include <stdio.h>
 
int main(){
    char s[11],out[11];
    int i,length,j=0;
    scanf("%s",s);
    length = sizeof s/sizeof s[0];
 
    for(i=0;i<length;i++){
        if(s[i]=='0')out[j]='0';
        if(s[i]=='1')out[j]='1';
        if(s[i]=='B')j--;
        j++;
}

Compiler output:
main.c: In function 'main':
main.c:14:1: error: expected declaration or statement at end of input
   14 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
  char box[10],a[10]={0};
  int cnt=0;
  for(int i=0;a[i]!='\0';i++){
    scanf("%c",&a[i]);
    if(a[i]=='0'||a[i]=='1') {
      box[cnt]=a[i];
      cnt++;
    }else if(a[i]=='B'){
      box[i-1]=' ';
    }
    i=0;
    while(box[i]!='\0'){
      printf("%c",box[i]);
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
  char box[10],a[10]={0};
  int cnt=0;
  for(int i=0;a[i]!='\0';i++){
    scanf("%c",&a[i]);
    if(a[i]=='0'||a[i]=='1') {
      box[cnt]=a[i];
      cnt++;
    }else if(a[i]=='B'){
      box[i-1]=' ';
    }
    i=0;
    while(box[i]!='\0'){
      printf("%s",box[i]);
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
  char box[10],a[10];
  int cnt=0;
  for(int i=0;a[i]!="\0";i++){
    scanf("%c",&a[i]);
    if(a[i]=='0'||a[i]=='1') {
      box[cnt]=a[i];
      cnt++;
    }else if(key=='B'){
      box[i-1]=' ';
    }
    i=0;
    while(box[i]!="\0"){
      printf("%s",box[i]);
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:19: warning: comparison between pointer and integer
    5 |   for(int i=0;a[i]!="\0";i++){
      |                   ^~
main.c:10:14: error: 'key' undeclared (first use in this function)
   10 |     }else if(key=='B'){
      |              ^~~
main.c:10:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:17: warning: comparison between pointer and integer
   14 |     while(box[i]!="\0"){
      |                 ^~
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
  char box[10],a[10];
  int cnt=0:
  for(int i=0;a[i]!="\0";i++){
    scanf("%c",&a[i]);
    if(a[i]=='0'||a[i]=='1') {
      box[cnt]=a[i];
      cnt++;
    }else if(key=='B'){
      box[i-1]=' ';
    }
    i=0;
    while(box[i]!="\0"){
      printf("%s",box[i]);
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:12: error: expected ',' or ';' before ':' token
    4 |   int cnt=0:
      |            ^
main.c:5:17: error: 'i' undeclared (first use in this function)
    5 |   for(int i=0;a[i]!="\0";i++){
      |                 ^
main.c:5:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:29: error: expected ';' before ')' token
    5 |   for(int i=0;a[i]!="\0";i++){
      |                             ^
      |                             ;
main.c:5:29: error: expected statement before ')' token
main.c:10:14: error: 'key' undeclared (first use in this function)
   10 |     }else if(key=='B'){
      |              ^~~
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;

int main(){
  string s;
  vector<char> h;
  rep(i, s.size()){
    if(s[i] == '0')
      h.pb(0);
    if(s[i] == '1')
      h.pb(1);
    if(s[i] == 'B' && h.size() > 0)
      h.pop_back;
  }
  rep(i, h,size())
    out(h[i]);
  memi;
}

Compiler output:
a.cc:28:18: error: macro "rep" passed 3 arguments, but takes just 2
   28 |   rep(i, h,size())
      |                  ^
a.cc:4:9: note: macro "rep" defined here
    4 | #define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:26:9: error: invalid use of non-static member function 'void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = char; _Alloc = std::allocator<char>]'
   26 |       h.pop_back;
      |       ~~^~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 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/stl_vector.h:1324:7: note: declared here
 1324 |       pop_back() _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
a.cc:28:3: error: 'rep' was not declared in this scope
   28 |   rep(i, h,size())
      |   ^~~
Language: Java

import java.util.*;
public class Main{
  public static void main (String[] args){
    String [] arr_1 = new String [];
    for (String str : arr_1){ System.out println(str);}
    List<String> list = new ArrayList<String>(Arrays.asList(arr_1));
    list.remove(("0B")||("1B"));
    String[] arr_2 = (String[]) list.toArray(new String [list.size()]);
    for (String str :arr_2) {
      System.out.println(str);
    }
  }
}

Compiler output:
Main.java:4: error: array dimension missing
    String [] arr_1 = new String [];
                                   ^
Main.java:5: error: ';' expected
    for (String str : arr_1){ System.out println(str);}
                                                ^
Main.java:5: error: not a statement
    for (String str : arr_1){ System.out println(str);}
                                                 ^
Main.java:5: error: ';' expected
    for (String str : arr_1){ System.out println(str);}
                                                    ^
4 errors
Language: Java

import java.util.*;
public class Main{
  public static void main (String[] args){
    var items = [];
    var result = items.filter(function( item ) ){
      return !item ==( 1B)||(0B );};
    console.log( result );
  }
}

Compiler output:
Main.java:4: error: illegal start of expression
    var items = [];
                ^
Main.java:5: error: ';' expected
    var result = items.filter(function( item ) ){
                                                ^
Main.java:6: error: ')' expected
      return !item ==( 1B)||(0B );};
                        ^
Main.java:6: error: ';' expected
      return !item ==( 1B)||(0B );};
                         ^
Main.java:6: error: binary numbers must contain at least one binary digit
      return !item ==( 1B)||(0B );};
                             ^
5 errors
Language: Java

import java.util.*;
public class Main{
  public static void main (String[] args){
    var items = [];
    var result = items.filter(function( item ) {
      return !item ==( 1B||0B );
    }
                              );
    console.log( result );
  }
}

Compiler output:
Main.java:4: error: illegal start of expression
    var items = [];
                ^
Main.java:5: error: ')' or ',' expected
    var result = items.filter(function( item ) {
                                              ^
Main.java:6: error: ')' expected
      return !item ==( 1B||0B );
                        ^
Main.java:6: error: binary numbers must contain at least one binary digit
      return !item ==( 1B||0B );
                           ^
Main.java:6: error: not a statement
      return !item ==( 1B||0B );
                         ^
Main.java:6: error: ';' expected
      return !item ==( 1B||0B );
                             ^
Main.java:8: error: illegal start of expression
                              );
                              ^
7 errors
Language: Java

import java.util.*;
public class Main{
  public static void main (String[] args){
    var items = [ System.in ];
    var result = items.filter(function( item ) {
      return !item ===( 1B||0B );
    }
                              );
    console.log( result );
  }
}

Compiler output:
Main.java:4: error: illegal start of expression
    var items = [ System.in ];
                ^
Main.java:4: error: not a statement
    var items = [ System.in ];
                        ^
Main.java:4: error: ';' expected
    var items = [ System.in ];
                           ^
Main.java:5: error: ')' or ',' expected
    var result = items.filter(function( item ) {
                                              ^
Main.java:6: error: illegal start of expression
      return !item ===( 1B||0B );
                     ^
Main.java:6: error: ')' expected
      return !item ===( 1B||0B );
                         ^
Main.java:6: error: binary numbers must contain at least one binary digit
      return !item ===( 1B||0B );
                            ^
Main.java:6: error: not a statement
      return !item ===( 1B||0B );
                          ^
Main.java:6: error: ';' expected
      return !item ===( 1B||0B );
                              ^
Main.java:8: error: illegal start of expression
                              );
                              ^
10 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
 
void PrintStack(stack<int> s) 
{ 
    // If stack is empty then return 
    if (s.empty())  
        return; 
      
  
    int x = s.top(); 
    s.pop(); 
    PrintStack(s); 
    cout << x; 
    s.push(x); 
} 
 
 
int main() {
  string x;
  stack<int> v;
  cin >> x;
  for (int i = 0; i < i.size(); i++) {
  	if (x[i] == 'b') {
      v.pop;
    }
    else if (x[i] == 0) {
      v.push(0);
    }
    else if (x[i] == 1) {
      v.push(1);
    }
  }
  PrintStack(v)'
}

Compiler output:
a.cc:35:16: warning: missing terminating ' character
   35 |   PrintStack(v)'
      |                ^
a.cc:35:16: error: missing terminating ' character
a.cc: In function 'int main()':
a.cc:24:25: error: request for member 'size' in 'i', which is of non-class type 'int'
   24 |   for (int i = 0; i < i.size(); i++) {
      |                         ^~~~
a.cc:26:9: error: invalid use of non-static member function 'void std::stack<_Tp, _Sequence>::pop() [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]'
   26 |       v.pop;
      |       ~~^~~
In file included from /usr/include/c++/14/stack:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:160,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_stack.h:291:7: note: declared here
  291 |       pop()
      |       ^~~
a.cc:35:16: error: expected ';' before '}' token
   35 |   PrintStack(v)'
      |                ^
      |                ;
   36 | }
      | ~
Language: C++

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


void PrintStack(stack<int> s) 
{ 
    // If stack is empty then return 
    if (s.empty())  
        return; 
      
  
    int x = s.top(); 
    s.pop(); 
    PrintStack(s); 
    cout << x; 
    s.push(x); 
} 


int main() {
  string x;
  stack<int> v;
  cin >> x;
  for (int i = 0; i < i.size(); i++) {
  	if (x[i] == 'b') {
      v.pop;
    }
    else if (x[i] == 0) {
      v.push(0);
    }
    else if (x[i] == 1) {
      v.push(1);
    }
  }
  PrintStack(v)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:25: error: request for member 'size' in 'i', which is of non-class type 'int'
   24 |   for (int i = 0; i < i.size(); i++) {
      |                         ^~~~
a.cc:26:9: error: invalid use of non-static member function 'void std::stack<_Tp, _Sequence>::pop() [with _Tp = int; _Sequence = std::deque<int, std::allocator<int> >]'
   26 |       v.pop;
      |       ~~^~~
In file included from /usr/include/c++/14/stack:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:160,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_stack.h:291:7: note: declared here
  291 |       pop()
      |       ^~~
a.cc:35:16: error: expected ';' before '}' token
   35 |   PrintStack(v)
      |                ^
      |                ;
   36 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    string t;
    cin >> s;
    for(int i = 0; i < s.size(); i++){
        if(s[i] == '0')
        t += '0';
        if(s[i] == '1')
        t += '1';
        if(s[i] == 'B'){
        if(t.size() != 0)
        t.erase(a.size() - 1);
        }
    }
    for(int i = 0; i < t.size(); i++)
        cout << t[i];
        cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'a' was not declared in this scope
   14 |         t.erase(a.size() - 1);
      |                 ^
Language: C++

#include <bits/st1dc++.h>
using namespace std;
int main(){
  string s,a="";
  cin>>s;
  for(int i=0;i<s.size();i++){
    if(s.at(i)=='B')if(a.size()!=0)a.erase(a.size()-1);
    else a+=s.at(i);
  }
  cout<<a<<endl;
}

Compiler output:
a.cc:1:10: fatal error: bits/st1dc++.h: No such file or directory
    1 | #include <bits/st1dc++.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/st1dc++.h>
using namespace std;
int main(){
  string s,a="";
  cin>>s;
  for(int i=0;i<s.size();i++){
    if(s.at(i)=='B')if(a.size()!=0)a.push_
    else a+=s.at(i);
  }
}

Compiler output:
a.cc:1:10: fatal error: bits/st1dc++.h: No such file or directory
    1 | #include <bits/st1dc++.h>
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
    string s;
    cin >>s;
    stack<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{
            a.pop();
        }
    }
    for(int i=0;i<a.size();i++){
        cout << a.at(i);
    }
    cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: 'class std::stack<char>' has no member named 'at'
   20 |         cout << a.at(i);
      |                   ^~
Language: C++

#include<iostream>
using namespace std;
string s;
int c;
int main(){
getline(cin,s);
while(c<s.length()){
if(s[i]!='0'&&s[i]!='1')
if(i>0) s.erase(c-1,2),c--;
else s.erase(c,1);
else c++;}
cout<<s<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: 'i' was not declared in this scope
    8 | if(s[i]!='0'&&s[i]!='1')
      |      ^
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
int i,len,l=0,l1=0,m=0;
char a[50],b[50],c[50];
scanf("%s",a);
len=strlen(a);
for(i=0;i<len;i++)
{
if(a[i]=='0')
{
b[m]='0';
m++;
l=m;
}
else if(a[i]=='1')
{
b[m]='1';
m++;
l=m;
}
else if(a[i]=='B')
{
if(l>0)
{
b[l-1]=' ';
l--;
}
}
}
for(i=0;i<m,;i++)
{
if(b[i]!=' ')
{
c[l1]=b[i];
l1++;
}
}
c[l1]='\0';
printf("%s",c);
}

Compiler output:
main.c: In function 'main':
main.c:32:13: error: expected expression before ';' token
   32 | for(i=0;i<m,;i++)
      |             ^
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
int i,len,l=0,l1=0,m=0;
char a[50],b[50],c[50];
scanf("%s",a);
len=strlen(a);
for(i=0;i<len;i++)
{
if(a[i]=='0')
{
b[m]='0';
m++
l=m;
}
else if(a[i]=='1')
{
b[m]='1';
m++;
l=m;
}
else if(a[i]=='B')
{
if(l>0)
{
b[l-1]=' ';
l--;
}
}
}
for(i=0;i<m,;i++)
{
if(b[i]!=' ')
{
c[l1]=b[i];
l1++;
}
}
c[l1]='\0';
printf("%s",c);
}

Compiler output:
main.c: In function 'main':
main.c:14:4: error: expected ';' before 'l'
   14 | m++
      |    ^
      |    ;
   15 | l=m;
      | ~   
main.c:32:13: error: expected expression before ';' token
   32 | for(i=0;i<m,;i++)
      |             ^
Language: C++

s = input()
l = []
for i in range(len(s)):
    if s[i] != 'B':
        l.append(s[i])
    else:
        if len(l)==0:
            pass
        else:
            del l[-1]
print("".join(l))  

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
int i,len,l=0,l1=0;
char a[50],b[50],c[50];
gets(a);
len=strlen(a);
for(i=0;i<len;i++)
{
if(a[i]=='0')
{
b[i]='0'
l++;
}
else if(a[i]=='1')
{
b[i]=='1';
l++;
}
else if(a[i]=='B')
{
if(l>1)
{
b[l-1]=' ';
}
}
}
for(i=0;i<l;i++)
{
if(b[i]!=' ')
{
c[l1]=b[i];
l1++;
}
}
puts(c);
}


Compiler output:
main.c: In function 'main':
main.c:7:1: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    7 | gets(a);
      | ^~~~
      | fgets
main.c:13:9: error: expected ';' before 'l'
   13 | b[i]='0'
      |         ^
      |         ;
   14 | l++;
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{ string a;int k=0;vector<string>b;
  b.resize(0);
  cin>>a;
  for(int i=0;i<a.size();i++)
  { if(a[i]=='0')
    { b.resize(b.size()+1);
      b[k++]='0';
      }
    else if(a[i]=='1')
    { b.resize(b.size()+1);
      b[k++]='1';}
 else {
          b.resize(b.size()-1);
          k--;
}
   for(int i=0;i<b.size();i++)
    cout<<b[i];
 return 0;}
 

      

Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: expected '}' at end of input
   21 |  return 0;}
      |            ^
a.cc:4:1: note: to match this '{'
    4 | { string a;int k=0;vector<string>b;
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{ string a;int k=0;vector<string>b;
  b.resize(0);
  cin>>a;
  for(int i=0;i<a.size();i++)
  { if(a[i]=='0')
    { b.resize(b.size()+1);
      b[k++]='0';
      }
    else if(a[i]=='1')
    { b.resize(b.size()+1);
      b[k++]='1';}
 else {
          b.resize(b.size()-1);
          k--;
}
   print(b);
 return 0;}
 

      

Compiler output:
a.cc: In function 'int main()':
a.cc:19:4: error: 'print' was not declared in this scope; did you mean 'rint'?
   19 |    print(b);
      |    ^~~~~
      |    rint
a.cc:20:12: error: expected '}' at end of input
   20 |  return 0;}
      |            ^
a.cc:4:1: note: to match this '{'
    4 | { string a;int k=0;vector<string>b;
      | ^
Language: C++

string = input()
l = 0
op = []
 
for i in string:
    if(i == '1'):
        op.append('1')
        l += 1
    elif(i == '0'):
        op.append('0')
        l+= 1
    elif(i == 'B'):
        if(len > 0):
            op.pop()
            l = l - 1
 
for i in op:
    print(i, end = ''

Compiler output:
a.cc:18:20: error: empty character constant
   18 |     print(i, end = ''
      |                    ^~
a.cc:1:1: error: 'string' does not name a type
    1 | string = input()
      | ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{ vector<stirng>a,b;int k=0;
  cin>>a;
  for(int i=0;i<a.size();i++)
  { if(a[i]=='0')
    { b.resize(b.size()+1);
      b[k++]='0';
      }
    else if(a[i]=='1')
    { b.resize(b.size()+1);
      b[k++]='1';}
 else {
          b.resize(b.size()-1);
          k--;
}
   cout<<b;
 return 0;}
 

      

Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'stirng' was not declared in this scope
    4 | { vector<stirng>a,b;int k=0;
      |          ^~~~~~
a.cc:4:16: error: template argument 1 is invalid
    4 | { vector<stirng>a,b;int k=0;
      |                ^
a.cc:4:16: error: template argument 2 is invalid
a.cc:6:19: error: request for member 'size' in 'a', which is of non-class type 'int'
    6 |   for(int i=0;i<a.size();i++)
      |                   ^~~~
a.cc:7:9: error: invalid types 'int[int]' for array subscript
    7 |   { if(a[i]=='0')
      |         ^
a.cc:8:9: error: request for member 'resize' in 'b', which is of non-class type 'int'
    8 |     { b.resize(b.size()+1);
      |         ^~~~~~
a.cc:8:18: error: request for member 'size' in 'b', which is of non-class type 'int'
    8 |     { b.resize(b.size()+1);
      |                  ^~~~
a.cc:9:8: error: invalid types 'int[int]' for array subscript
    9 |       b[k++]='0';
      |        ^
a.cc:11:14: error: invalid types 'int[int]' for array subscript
   11 |     else if(a[i]=='1')
      |              ^
a.cc:12:9: error: request for member 'resize' in 'b', which is of non-class type 'int'
   12 |     { b.resize(b.size()+1);
      |         ^~~~~~
a.cc:12:18: error: request for member 'size' in 'b', which is of non-class type 'int'
   12 |     { b.resize(b.size()+1);
      |                  ^~~~
a.cc:13:8: error: invalid types 'int[int]' for array subscript
   13 |       b[k++]='1';}
      |        ^
a.cc:15:13: error: request for member 'resize' in 'b', which is of non-class type 'int'
   15 |           b.resize(b.size()-1);
      |             ^~~~~~
a.cc:15:22: error: request for member 'size' in 'b', which is of non-class type 'int'
   15 |           b.resize(b.size()-1);
      |                      ^~~~
a.cc:19:12: error: expected '}' at end of input
   19 |  return 0;}
      |            ^
a.cc:4:1: note: to match this '{'
    4 | { vector<stirng>a,b;int k=0;
      | ^
Language: Java

import java.util.*;
class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	String str = scan.next();
      	
      	ArrayList<String> list = new ArrayList<>();
      	int j = 0;
      	for(int i = 0; i < str.length(); i++){
        	if(str.charAt(i) <> B){
            	list.add(str.charAt(i));
              	j = j + 1;
            }else if (j <> 0){
            	list.remove(j - 1);
            }
        }
    }
}

Compiler output:
Main.java:10: error: illegal start of expression
        	if(str.charAt(i) <> B){
        	                  ^
Main.java:13: error: illegal start of expression
            }else if (j <> 0){
                         ^
2 errors
Language: C++

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

int main(){
  string s;
  cin>>s;
  string t;
  
  for(int i=0;i<s.size();i++){
    switch(s.at(i)){
      case '0':
        t=t+'0';
        break;
      case '1':
        t=t+'1';
        break;
      case 'B':
        if(!t.empty(){
          t.pop_back();
        }
    }
  }
  
  cout<<t<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:22: error: expected ')' before '{' token
   18 |         if(!t.empty(){
      |           ~          ^
      |                      )
a.cc:21:5: error: expected primary-expression before '}' token
   21 |     }
      |     ^
Language: C++

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

int main(){
  string s;
  cin>>s;
  string t;
  
  for(int i=0;i<s.size();i++){
    switch(s.at(i)){
      case '0':
        t=t+'0';
        break;
      case '1':
        t=t+'1';
        break;
      case 'B':
        if(!s.empty(){
          t.pop_back();
        }
    }
  }
  
  cout<<t<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:22: error: expected ')' before '{' token
   18 |         if(!s.empty(){
      |           ~          ^
      |                      )
a.cc:21:5: error: expected primary-expression before '}' token
   21 |     }
      |     ^
Language: C++

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

int main(){
  string s;
  cin>>s;
  string t;
  
  for(int i=0;i<s.size();i++){
    switch(s.at(i)){
      case '0':
        t=t+'0';
        break;
      case '1':
        t=t+'1';
        break;
      case 'B':
        t.pop_back();
    }
  }
  
  cout<<s

Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: expected ';' at end of input
   22 |   cout<<s
      |          ^
      |          ;
a.cc:22:10: error: expected '}' at end of input
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main() {
  
  string s;
  cin >> s;
  vector<char> L(0);
  
  if(s.at(0) == '0'){
      L.push_back('0');
    }
    if(s.at(0) == '1'){
      L.push_back('1');
    }
  
  for(int i = 1; i < s.size(); i++){
    if(s.at(i) == '0'){
      L.push_back('0');
    }
    if(s.at(i) == '1'){
      L.push_back('1');
    }
    if(s.at(i) == 'B'){
      if(L.size == 0){
        continue;
      }
      else{
        L.pop_back();
      }
    }
  }
  
  for(int i = 0; i < L.size(); i++){
    cout << L.at(i);
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:12: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = char; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   25 |       if(L.size == 0){
      |          ~~^~~~
      |                ()
Language: C++

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

int main() {
  
  string s;
  cin >> s;
  vector<char> L(0);
  
  if(s.at(0) == '0'){
      L.push_back('0');
    }
    if(s.at(0) == '1'){
      L.push_back('1');
    }
  
  for(int i = 1; i < s.size(); i++){
    if(s.at(i) == '0'){
      L.push_back('0');
    }
    if(s.at(i) == '1'){
      L.push_back('1');
    }
    if(s.at(i) == 'B'){
      if(L.size = 0){
        continue;
      }
      else{
        L.pop_back();
      }
    }
  }
  
  for(int i = 0; i < L.size(); i++){
    cout << L.at(i);
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:12: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = char; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   25 |       if(L.size = 0){
      |          ~~^~~~
      |                ()
Language: C++

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

int main() {
  
  string s;
  cin >> s;
  vector<char> L(0);
  
  if(s.at(0) == '0'){
      L.push_back(0) = '0';
    }
    if(s.at(0) == '1'){
      L.push_back(0) = '1';
    }
  
  for(int i = 1; i < s.size(); i++){
    if(s.at(i) == '0'){
      L.push_back() = '0';
    }
    if(s.at(i) == '1'){
      L.push_back() = '1';
    }
    if(s.at(i) == 'B'){
      L.pop_back();
    }
  }
  
  for(int i = 0; i < N; i++){
    cout << L.at(i);
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: invalid use of 'void'
   11 |       L.push_back(0) = '0';
      |       ~~~~~~~~~~~^~~
a.cc:14:18: error: invalid use of 'void'
   14 |       L.push_back(0) = '1';
      |       ~~~~~~~~~~~^~~
a.cc:19:18: error: no matching function for call to 'std::vector<char>::push_back()'
   19 |       L.push_back() = '0';
      |       ~~~~~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 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/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = char; _Alloc = std::allocator<char>; value_type = char]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = char; _Alloc = std::allocator<char>; value_type = char]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 0 provided
a.cc:22:18: error: no matching function for call to 'std::vector<char>::push_back()'
   22 |       L.push_back() = '1';
      |       ~~~~~~~~~~~^~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = char; _Alloc = std::allocator<char>; value_type = char]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = char; _Alloc = std::allocator<char>; value_type = char]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 0 provided
a.cc:29:22: error: 'N' was not declared in this scope
   29 |   for(int i = 0; i < N; i++){
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  char s[15];
  cin >> s;
  int w=0;
  char t[15];
  for(int i=0;i<strlen(s);i++){
    if(s[i]=='0'){
      t[w]='0';
      w++;
    }
    if(s[i]=='1'){
      t[w]='1';
      w++;
    }
    if(s[i]=='B'){
      t[w-1]='\0';
      w--;
    }
  }
  t[w]='\0';
  cout << t << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:23:21: error: expected '}' at end of input
   23 |   cout << t << endl;
      |                     ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
int main(){
  char s[15];
  std::cin >> s;
  int w=0;
  char t[15];
  for(int i=0;i<strlen(s);i++){
    if(s[i]=='0'){
      t[w]='0';
      w++;
    }
    if(s[i]=='1'){
      t[w]='1';
      w++;
    }
    if(s[i]=='B'){
      s[w-1]='\0';
      w--;
    }
  }
  std::cout << t << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   21 |   std::cout << t << endl;
      |                     ^~~~
      |                     std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main() {

	string S;
	cin>>S;
  
  if(S.at(0)=='B'){S.at(0)='';}
  for(int i=1; i<S.length();i++){
    if(S.at(i)=='B'){S.at(i)='';S.at(i-1)='';}}

	
	cout<<S<<endl;
}


Compiler output:
a.cc:9:28: error: empty character constant
    9 |   if(S.at(0)=='B'){S.at(0)='';}
      |                            ^~
a.cc:11:30: error: empty character constant
   11 |     if(S.at(i)=='B'){S.at(i)='';S.at(i-1)='';}}
      |                              ^~
a.cc:11:43: error: empty character constant
   11 |     if(S.at(i)=='B'){S.at(i)='';S.at(i-1)='';}}
      |                                           ^~
Language: C

#include<iostream>
#include<string>
using namespace std;

int main()
{
    string s;
    cin >> s;
    for(int i=0; i<10; i++)
    {
        if(s[i]==66)
        {
            if(i==0)
                s.erase(i,i+1);
            else
                s.erase(i-1, i+1);
        }
    }
    cout << s;
    return 0;
}


Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    int n;
    string s;
    cin>>s;
    for(int i=0;i<s.length();i++){
        if(s[i]=='B' && s.length()>0){
            s.pop();
        }
    }
    cout<<s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop'
   10 |             s.pop();
      |               ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    int n;
    string s;
    cin>>s;
    for(itn i=0;i<s.length();i++){
        if(s[i]=='B' && s.length()>0){
            s.pop();
        }
    }
    cout<<s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'itn' was not declared in this scope; did you mean 'int'?
    8 |     for(itn i=0;i<s.length();i++){
      |         ^~~
      |         int
a.cc:8:17: error: 'i' was not declared in this scope
    8 |     for(itn i=0;i<s.length();i++){
      |                 ^
a.cc:10:15: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop'
   10 |             s.pop();
      |               ^~~
Language: Java

import java.io.*;
public class Main{
  public static void main(String[] args) throws IOException{
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String s = reader.readLine();
    Stack<String> stack = new Stack<String>();
    for(int i=0;i<s.length();i++){
      if(s.charAt(i)=='0'){
        stack.push("0");}
      if(s.charAt(i)=='1'){
        stack.push("1");}
      if(s.charAt(i)=='B'){
        stack.pop();}}
    String res = "";
    while(!s.isEmpty()){
      res = res + s.pop();}
    System.out.println(res);}}

Compiler output:
Main.java:6: error: cannot find symbol
    Stack<String> stack = new Stack<String>();
    ^
  symbol:   class Stack
  location: class Main
Main.java:6: error: cannot find symbol
    Stack<String> stack = new Stack<String>();
                              ^
  symbol:   class Stack
  location: class Main
Main.java:16: error: cannot find symbol
      res = res + s.pop();}
                   ^
  symbol:   method pop()
  location: variable s of type String
3 errors
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    char[] c=sc.next().toCharArray();
    String ans="";
    String bef=ans;
    for(int i=0;i<c.length;i++){
      switch(c[i]){
        case '0':
          bef=ans;
          ans+="0";
          break;
        case '1':
          bef=ans;
          ans+="1";
          break;
        case 'B':
          char[] d=ans.toCharArrray();
          d[d.length-1]=' ';
          ans=String.valueOf(d);
          break;
      }
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:20: error: cannot find symbol
          char[] d=ans.toCharArrray();
                      ^
  symbol:   method toCharArrray()
  location: variable ans of type String
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    char[] c=sc.next().toCharArray();
    String ans="";
    String bef=ans;
    for(int i=0;i<c.length;i++){
      switch(c[i]){
        case '0':
          bef=ans;
          ans+="0";
          break;
        case '1':
          bef=ans;
          ans+="1";
          break;
        case 'B':
          char[] d=ans.toCharArrray();
          d[d.length-1]='';
          ans=String.valueOf(d);
          break;
      }
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:21: error: empty character literal
          d[d.length-1]='';
                        ^
1 error
Language: Java



import java.util.Scanner;
import java.util.Stack;


public class B {
    static Scanner sc = new Scanner(System.in);


    public static void main(String[] args) {
        char[] s = sc.next().toCharArray();
        Stack<Character> stack = new Stack<>();
        for (int i = 0; i < s.length; i++) {
            if (s[i] != 'B') {
                stack.push(s[i]);
            } else {
                if (stack.size() > 0) {
                    stack.pop();
                }
            }
        }
        String ans = "";
        for (int i = 0; i < stack.size(); i++) {
            ans += stack.get(i);
        }
        System.out.println(ans);
    }

}


Compiler output:
Main.java:7: error: class B is public, should be declared in a file named B.java
public class B {
       ^
1 error
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_map>
#include <map>
using namespace std ;

int main(){
    string s,t;
    cin >> s;
    int n = s.size();
    for(int i = 0; i < n; i++){
        if(s[i] == 0){
            t.push_back('0'); 
        }else if(s[i] == 1){
            t.push_back('1');
        }else(s[i] == B){
            t.pop_back()
        }
        cout << t << endl;
    }
    return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:23: error: 'B' was not declared in this scope
   22 |         }else(s[i] == B){
      |                       ^
Language: C++

#include <iostream>
#include <cstring>
using namespace std;
int main(){
string a;
  cin>>a;
  string out;
  int top=-1;
  for(int i=0;a[i]!='\0';i++){
  if(a[i]=='B'){
    if(top==-1)continue;
    out[top--]='\0';
  }
    else if(a[i]=='0'){
    out+='0';
      top++;
    }else if(a[i]=='1'){
    out+='1';
      top++
    }
  }
  cout <<out<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: expected ';' before '}' token
   19 |       top++
      |            ^
      |            ;
   20 |     }
      |     ~
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
int a,b,c,d,e,f,g,h,m,n,z,x,k[1001],l,o,s,ans,sum,maxa;
char st[11];
int main ( )
{
	gets(st);
	l=strlen(st);o=0;
	for(a=1;a<=l;a++)
	{
		if(st[a-1]=='0'||st[a-1]=='1')
		{
			o++;
			k[o]=st[a-1]-48;
		}
		else
		o=max(o-1,0);
	}
	for(a=1;a<=o;a++)
	cout<<k[a];
	return 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |         gets(st);
      |         ^~~~
      |         getw
a.cc:9:11: error: 'strlen' was not declared in this scope
    9 |         l=strlen(st);o=0;
      |           ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<cstdio>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C

#include<stdio.h>
int main(){
  char str1[11];
  char str2[11];
  int i,j=0,n;
  
  scanf("%s",str1);
  for(i=0;str1[i]!='\0';i++){
    if(str1[i]=='B'){
      j--;
    }else{
      str2[j++]=str1[i];
    }
  }
  str2[j]='\0';
  for(i=0;str2[i]!='\0';i++)
    prntf("%c",str2[i]);
}


Compiler output:
main.c: In function 'main':
main.c:17:5: error: implicit declaration of function 'prntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   17 |     prntf("%c",str2[i]);
      |     ^~~~~
      |     printf
Language: C

#include<stdio.h>
int main(){
  char str1[11];
  char str2[11];
  int i,j=0,n;
  
  scanf("%s",str);
  for(i=0;str1[i]!='\0';i++){
    if(str1[i]=='B'){
      j--;
    }else{
      str2[j++]=str1[i];
    }
  }
  str2[j]='\0';
  for(i=0;str2[i]!='\0';i++)
    prntf("%c",str[i]);
}

Compiler output:
main.c: In function 'main':
main.c:7:14: error: 'str' undeclared (first use in this function); did you mean 'str2'?
    7 |   scanf("%s",str);
      |              ^~~
      |              str2
main.c:7:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:5: error: implicit declaration of function 'prntf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   17 |     prntf("%c",str[i]);
      |     ^~~~~
      |     printf
Language: C++

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

int main(){
	string s;
    cin>>s;
 	for(int i=0;i<s.size()-1;++i){
    	if(s[i] != 'B' && s[i+1] !='B') cout<<s[i]
    }
  	if(s[s.size()-1]!='B')cout<<s[s.size()-1];
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:51: error: expected ';' before '}' token
    8 |         if(s[i] != 'B' && s[i+1] !='B') cout<<s[i]
      |                                                   ^
      |                                                   ;
    9 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
string a;
int b[15],q;
int main()
{
    cin>>a;
    for(int i=0;i<a.size();i++)
    {
        if(a[i]=='0'){q++;b[q]=0;}   
        if(a[i]=='1'){q++;b[q]=1;}
        if(a[i]=='B'&&q>=1)q--; 
    }    
    for(int i=1;i<=q;i++)cout<<b[i];
    cout<<endl！
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: 'endl\U0000ff01' was not declared in this scope
   15 |     cout<<endl！
      |           ^~~~~~
Language: C

#include<stdio.h>
main()
{
	int s[4];
	int i;
	for(i=1;i<=4;i++)
	{
	scanf("%c",s[i]);
	if(char s[i]==0)
		printf("%c",s[i]);
		if(char s[i]==1)
		printf("%c",s[i]);
		if(char s[i]=='65')
		{
			s[i-1]='\0';
			}
	}
	printf("%c%c%c%c",s[i]);
	return 0;
}





Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main()
      | ^~~~
main.c: In function 'main':
main.c:9:12: error: expected expression before 'char'
    9 |         if(char s[i]==0)
      |            ^~~~
main.c:11:20: error: expected expression before 'char'
   11 |                 if(char s[i]==1)
      |                    ^~~~
main.c:13:20: error: expected expression before 'char'
   13 |                 if(char s[i]=='65')
      |                    ^~~~
main.c:13:31: warning: multi-character character constant [-Wmultichar]
   13 |                 if(char s[i]=='65')
      |                               ^~~~
Language: C

#include<stdio.h>
main()
{
	char s[4];
	int i;
	for(i=1;i<=4;i++)
	{
	scanf("%c",s[i]);
	if(char s[i]==0)
		printf("%c",s[i]);
		if(char s[i]==1)
		printf("%c",s[i]);
		if(char s[i]==B)
		{
			s[i-1]='\0';
			}
	}
	printf("%c%c%c%c",s[i]);
	return 0;
}





Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main()
      | ^~~~
main.c: In function 'main':
main.c:9:12: error: expected expression before 'char'
    9 |         if(char s[i]==0)
      |            ^~~~
main.c:11:20: error: expected expression before 'char'
   11 |                 if(char s[i]==1)
      |                    ^~~~
main.c:13:20: error: expected expression before 'char'
   13 |                 if(char s[i]==B)
      |                    ^~~~
Language: C

#include<stdio.h>
main()
{
	char s[i];
	int i;
	for(i=1;i<=4;i++)
	{
	scanf("%c",s[i]);
	if(char s[i]==0)
		printf("%c",s[i]);
		if(char s[i]==1)
		printf("%c",s[i]);
		if(char s[i]==B)
		{
			s[i-1]='\0';
			}
	}
	printf("%c%c%c%c",s[i]);
	return 0;
}


Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main()
      | ^~~~
main.c: In function 'main':
main.c:4:16: error: 'i' undeclared (first use in this function)
    4 |         char s[i];
      |                ^
main.c:4:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:12: error: expected expression before 'char'
    9 |         if(char s[i]==0)
      |            ^~~~
main.c:11:20: error: expected expression before 'char'
   11 |                 if(char s[i]==1)
      |                    ^~~~
main.c:13:20: error: expected expression before 'char'
   13 |                 if(char s[i]==B)
      |                    ^~~~
Language: C

#include<stdio.h>
int main()
{
	char s[i];
	int i;
	scanf("%c%c%c%c",s[i]);
	for(i=0;i<4;i++)
	{
	if(char s[i]==0)
		printf("%c",s[i]);
		if(char s[i]==1)
		printf("%c",s[i]);
		if(char s[i]==B)
		{
			s[i-1]='\0';
			}
	}
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:4:16: error: 'i' undeclared (first use in this function)
    4 |         char s[i];
      |                ^
main.c:4:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:12: error: expected expression before 'char'
    9 |         if(char s[i]==0)
      |            ^~~~
main.c:11:20: error: expected expression before 'char'
   11 |                 if(char s[i]==1)
      |                    ^~~~
main.c:13:20: error: expected expression before 'char'
   13 |                 if(char s[i]==B)
      |                    ^~~~