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

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

int main() {
  string s,S;
  cin >> s ;
  
  for(int i=0;i<s.size();i++){
    if(s.at(i) == '0'){
      S = S + '0';
    }
    
    else if(s,at(i) == '1'){
      S = S + '1';
    }
    
    else{
      S.end() = '';
    }
  }
  
  cout << S << endl;
}


Compiler output:
a.cc:18:17: error: empty character constant
   18 |       S.end() = '';
      |                 ^~
a.cc: In function 'int main()':
a.cc:13:15: error: 'at' was not declared in this scope
   13 |     else if(s,at(i) == '1'){
      |               ^~
a.cc:18:17: error: no match for 'operator=' (operand types are 'std::__cxx11::basic_string<char>::iterator' and 'char')
   18 |       S.end() = '';
      |                 ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:1038:11: note: candidate: 'constexpr __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >& __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >::operator=(const __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >&)'
 1038 |     class __normal_iterator
      |           ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1038:11: note:   no known conversion for argument 1 from 'char' to 'const __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >&'
/usr/include/c++/14/bits/stl_iterator.h:1038:11: note: candidate: 'constexpr __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >& __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >::operator=(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >&&)'
/usr/include/c++/14/bits/stl_iterator.h:1038:11: note:   no known conversion for argument 1 from 'char' to '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >&&'
Language: C++

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

int main() {
  string s,S;
  cin >> s ;
  
  for(int i=0;i<s.size();i++){
    if(s.at(i) == '0'){
      S = S + '0';
    }
    
    else if(){
      S = S + '1';
    }
    
    else{
      S.end() = '';
    }
  }
  
  cout << S << endl;
}


Compiler output:
a.cc:18:17: error: empty character constant
   18 |       S.end() = '';
      |                 ^~
a.cc: In function 'int main()':
a.cc:13:13: error: expected primary-expression before ')' token
   13 |     else if(){
      |             ^
a.cc:18:17: error: no match for 'operator=' (operand types are 'std::__cxx11::basic_string<char>::iterator' and 'char')
   18 |       S.end() = '';
      |                 ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:1038:11: note: candidate: 'constexpr __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >& __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >::operator=(const __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >&)'
 1038 |     class __normal_iterator
      |           ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1038:11: note:   no known conversion for argument 1 from 'char' to 'const __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >&'
/usr/include/c++/14/bits/stl_iterator.h:1038:11: note: candidate: 'constexpr __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >& __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >::operator=(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >&&)'
/usr/include/c++/14/bits/stl_iterator.h:1038:11: note:   no known conversion for argument 1 from 'char' to '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >&&'
Language: C++

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

int main(){
  string A, B;
  cin >> A;
  for (int i=0; i<10; i++){
    if (A.at(i)=='0'){
      B+="0";
    }
    else if(A.at(i)=='1'){
      B+="1";
    }
    else if(A.at(i)=='B'){
      if (B=="0"){
        continue;
      }
      else {
        B-=B.at(i-1);
      }
    }
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: no match for 'operator-=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
   19 |         B-=B.at(i-1);
      |         ~^~~~~~~~~~~
Language: C

# include "stdio.h"

int main(){
    char s[11],a[11];
    scanf("%s",s);
    int c=0;
    for(i=0;i<11;i++)
        a[i]='\0';
    for(int i=0;i<10;i++){
        if(s[i]!='B'){
            a[c]=s[i];
            c++;
        }else{
            if(c!=0) c--;
            a[c]='\0';
        }
    }
    printf("%s\n",a);

  


}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: 'i' undeclared (first use in this function)
    7 |     for(i=0;i<11;i++)
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 's' was not declared in this scope
    9 |                 if(s[i]=='0')
      |                    ^
a.cc:10:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |                         ans[i]='0';
      |                         ^~~
      |                         abs
a.cc:12:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |                         ans[i]='1';
      |                         ^~~
      |                         abs
a.cc:14:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |                         ans[i-1]="";
      |                         ^~~
      |                         abs
a.cc:16:13: error: 'i' was not declared in this scope
   16 |         for(i=0;i<s.size();i++)
      |             ^
a.cc:16:19: error: 's' was not declared in this scope
   16 |         for(i=0;i<s.size();i++)
      |                   ^
a.cc:17:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |                 cout<<ans[i];
      |                       ^~~
      |                       abs
Language: C++

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

int main(){
  ios::sync_with_stdio(0);
  cin.tie(0);
  
  string s;
  cin >> s;
  
  string ans = "";
  for (int i=0; i<s.length(); i++){
   	if (s[i] == '1'){
		ans.push_back("1");
    }
    else if (s[i] == '0'){
        ans.push_back("0");
    }
    else{
      if (!s.empty()){
        ans.pop_back();
      }
    }
  }
  cout << ans;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:31: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   14 |                 ans.push_back("1");
      |                               ^~~
      |                               |
      |                               const char*
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:1572:24: note:   initializing argument 1 of 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 1572 |       push_back(_CharT __c)
      |                 ~~~~~~~^~~
a.cc:17:23: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   17 |         ans.push_back("0");
      |                       ^~~
      |                       |
      |                       const char*
/usr/include/c++/14/bits/basic_string.h:1572:24: note:   initializing argument 1 of 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::push_back(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 1572 |       push_back(_CharT __c)
      |                 ~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {

	string s;
	cin >> s;
	string ans;

	for (int i = 0; i < s.size(); i++) {
		if (s[i] == '0') {
			ans.push_back('0');
		}
		else if (s[i] == '1') {
			ans.push_back('1');
		}
		else {
			if (ans.size != 0) {
				ans.pop_back();
			}
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:33: 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 '()' ?)
   19 |                         if (ans.size != 0) {
      |                             ~~~~^~~~
      |                                     ()
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {

  string s,t;
  cin >> s;
  
  for(int i=0;i<s.size();i++){
    if(s.at(i)==B){
      if(t!=""){
        t.erace(-1);
      }
    }else{
      t+=s.at(i);
    }
  }
  cout << t << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'B' was not declared in this scope
   10 |     if(s.at(i)==B){
      |                 ^
a.cc:12:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'erace'; did you mean 'erase'?
   12 |         t.erace(-1);
      |           ^~~~~
      |           erase
Language: C++

#include<iostream>
using namespace std;
int main()
{
string commands;
  cin>>commands;
string output="";
  for(i=0;i<commands.length();i++)
  {
    if(commands[i]!='B')
      output.push_back(commands[i]);
    else
      output.pop_back();
  }
 cout<<output;
  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i<commands.length();i++)
      |       ^
Language: C++

#include <iostream>

//#include <string>
using namespace std;

int main()
{
	char  str[10] = {0};
	cin >> str;

	uint32_t i = 0;
	while (1) {

		switch (str[i]) {
		case '\0':
			printf("%s\n", str);
			return 0;

		case 'B':
			if (i == 0) {
				memmove(&str[i], &str[i + 1], 9);
			}
			else {
				memmove(&str[i - 1], &str[i + 1], 10 - i - 1);
				i--;
			}
			break;
		default:
			i++;
			break;
		}
	}
	return 0;
//	std::cout << "Hello World!\n"; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'uint32_t' was not declared in this scope
   11 |         uint32_t i = 0;
      |         ^~~~~~~~
a.cc:2:1: note: 'uint32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    1 | #include <iostream>
  +++ |+#include <cstdint>
    2 | 
a.cc:14:29: error: 'i' was not declared in this scope
   14 |                 switch (str[i]) {
      |                             ^
a.cc:21:33: error: 'memmove' was not declared in this scope
   21 |                                 memmove(&str[i], &str[i + 1], 9);
      |                                 ^~~~~~~
a.cc:2:1: note: 'memmove' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | 
a.cc:24:33: error: 'memmove' was not declared in this scope
   24 |                                 memmove(&str[i - 1], &str[i + 1], 10 - i - 1);
      |                                 ^~~~~~~
a.cc:24:33: note: 'memmove' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

int main(int argc, const char * argv[]) {
    
    string stmp, stmp2;
    //vector<string> vs;
    /*
    while(true)
    {
        //char input = getchar();
        char input;
        cin.get(input);
        
        if(input == '0')
        {
            //vs.push_back("0");
            stmp.push_back('0');
        }
        else if(input == '1')
        {
            stmp.push_back('1');
        }
        else if(input == 'B')
        {
            stmp.pop_back();
        }
        
        cout << "\r" << stmp;
    }
    */
    cin >> stmp;
    for(int i = 0; i < stmp.size(); i++)
    {
        if(stmp[i] == 'B')
        {
            stmp2.pop_back();
        }
        else
        {
            stmp2.push_back(stmp[i]);
        }
    }
    cout << stmp2 << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:3:5: error: 'string' was not declared in this scope
    3 |     string stmp, stmp2;
      |     ^~~~~~
a.cc:29:5: error: 'cin' was not declared in this scope
   29 |     cin >> stmp;
      |     ^~~
a.cc:29:12: error: 'stmp' was not declared in this scope
   29 |     cin >> stmp;
      |            ^~~~
a.cc:34:13: error: 'stmp2' was not declared in this scope
   34 |             stmp2.pop_back();
      |             ^~~~~
a.cc:38:13: error: 'stmp2' was not declared in this scope
   38 |             stmp2.push_back(stmp[i]);
      |             ^~~~~
a.cc:41:5: error: 'cout' was not declared in this scope
   41 |     cout << stmp2 << endl;
      |     ^~~~
a.cc:41:13: error: 'stmp2' was not declared in this scope
   41 |     cout << stmp2 << endl;
      |             ^~~~~
a.cc:41:22: error: 'endl' was not declared in this scope
   41 |     cout << stmp2 << endl;
      |                      ^~~~
Language: C++

#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define show(x) cout<<#x<<" = "<<x<<endl;
#define print(x)cout<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;

int main() {
  string s;
  cin >> s;
  string t = "";
  rep(i,n){
    if(s[i] =='B' && sz(t))t.pop_back();
    else t.push_back(s[i]);
  }
  print(t);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:9: error: 'n' was not declared in this scope
   44 |   rep(i,n){
      |         ^
a.cc:4:38: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int i = 0; i < (n); ++i)
      |                                      ^
Language: C++

#include <iostream>
#include<string>
using namespace std;
int main()
{
	char a[100], b[100];
	int n = 0;
	cin >> a;
	int s = strlen(a);
	for (int i = 0; i < s; i++)
	{
		if (a[i] == 'B')
		{
			n--;
			if (n < 0)
				n = 0;
		}
		else b[n++] = a[i];
	}
	b[n] = '\0';
	cout << b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'strlen' was not declared in this scope
    9 |         int s = strlen(a);
      |                 ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include <iostream>
#include<string>
using namespace std;
int main()
{
	char a[100], b[100];
	int n = 0;
	cin >> a;
	int s = strlen(a);
	for (int i = 0; i < s; i++)
	{
		if (a[i] == 'B')
		{
			n--;
			if (n < 0)
				n = 0;
		}
		else b[n++] = a[i];
	}
	cout << b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'strlen' was not declared in this scope
    9 |         int s = strlen(a);
      |                 ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C

#include<stdio.h>
#include <string.h>

int main(){
  char  str[10];      //初期の入力
  char  out[10]={};      //出力用
  int   l, p=0;       //l:長さチェック p;行列の長さ把握

  scanf("%s",&str);
  l = strlen(str);    //入力された文章の長さをチェック

  for(i=0;i<l;i++){
    if(str[i] == '0'){
      out[i] = '0';
      p++;
    }else if(str[i] == '1'){
      out[i] = '1';
      p++
    }else{p--;}
  }
  printf("%s",out);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:7: error: 'i' undeclared (first use in this function)
   12 |   for(i=0;i<l;i++){
      |       ^
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:10: error: expected ';' before '}' token
   18 |       p++
      |          ^
      |          ;
   19 |     }else{p--;}
      |     ~
Language: C

#include<stdio.h>
#include <string.h>

int main(){
  char  str[10];      //初期の入力
  cahr  out[10];      //出力用
  int   l, p=0;       //l:長さチェック p;行列の長さ把握

  scanf("%s",&str);
  l = strlen(str);    //入力された文章の長さをチェック

  for(i=0;i<l;i++){
    if(str[i] == '0'){
      out[i] = '0';
      p++;
    }else if(str[i] == '1'){
      out[i] = '1';
      p++
    }else{p--;}
  }
  printf("%s",out);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: unknown type name 'cahr'; did you mean 'char'?
    6 |   cahr  out[10];      //出力用
      |   ^~~~
      |   char
main.c:12:7: error: 'i' undeclared (first use in this function)
   12 |   for(i=0;i<l;i++){
      |       ^
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:10: error: expected ';' before '}' token
   18 |       p++
      |          ^
      |          ;
   19 |     }else{p--;}
      |     ~
Language: C

#include<stdio.h>
#include <string.h>

int main(){
  char  str[10];      //初期の入力
  cahr  out[10];      //出力用
  int   l, p=0;       //l:長さチェック p;行列の長さ把握

  scanf("%s",&str);
  l = strlen(str);    //入力された文章の長さをチェック

  for(i=0;i<l;i++){
    switch(str[i]){
      case 0:
              out[i] = 0;
              p++;
              break;
      case 1:
              out[i] = 1;
              p++;
              break;
      case B:
              p--;
              break;
    }
    for(j=0;j<p;j++){
      printf("%c",str[j]);
    }
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: unknown type name 'cahr'; did you mean 'char'?
    6 |   cahr  out[10];      //出力用
      |   ^~~~
      |   char
main.c:12:7: error: 'i' undeclared (first use in this function)
   12 |   for(i=0;i<l;i++){
      |       ^
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:12: error: 'B' undeclared (first use in this function)
   22 |       case B:
      |            ^
main.c:26:9: error: 'j' undeclared (first use in this function)
   26 |     for(j=0;j<p;j++){
      |         ^
Language: C++

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

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


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

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

int main(){
  string s;
  cin >> s;
  for(int i = 0; i < N; i++){
    if(s[i] == 'B'){
      continue;
    }
    else{
      if(i == N-1){
        cout << s[i];
      }
      else if(s[i+1] == B){
        continue;
      }
      else{
        cout << s[i];
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'N' was not declared in this scope
    7 |   for(int i = 0; i < N; i++){
      |                      ^
a.cc:15:25: error: 'B' was not declared in this scope
   15 |       else if(s[i+1] == B){
      |                         ^
Language: C

#include <stdio.h>
int main() {
	char s[10], string[10], c;
	int ii = 0;
	scanf("%s", s);
	for (int i = 0;i < sizeof(s);i++) {
		if (s[i] != 'B') {
			c = s[i];
			string[ii] = c;//フ対策
			ii++;
		}
		else {
			if (ii > 0) ii--:
		}
	}
	string[ii] = '\0';
	printf("%s\n", string);
}

Compiler output:
main.c: In function 'main':
main.c:13:41: error: expected ';' before ':' token
   13 |                         if (ii > 0) ii--:
      |                                         ^
      |                                         ;
Language: C++

int main() {
	string s;
	cin >> s;
	vector<char> d;
  int t =s.size();
  for (int i = 0; i <t; ++i) {
    if(s[i]=='B'){
		if(d.size()){
			d.pop_back();}
			}
    else{d.push_back(s[i]);}
  }
  for(auto x:d){cout << x;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:9: error: 'string' was not declared in this scope
    2 |         string s;
      |         ^~~~~~
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> s;
      |         ^~~
a.cc:3:16: error: 's' was not declared in this scope
    3 |         cin >> s;
      |                ^
a.cc:4:9: error: 'vector' was not declared in this scope
    4 |         vector<char> d;
      |         ^~~~~~
a.cc:4:16: error: expected primary-expression before 'char'
    4 |         vector<char> d;
      |                ^~~~
a.cc:8:20: error: 'd' was not declared in this scope
    8 |                 if(d.size()){
      |                    ^
a.cc:11:10: error: 'd' was not declared in this scope
   11 |     else{d.push_back(s[i]);}
      |          ^
a.cc:13:14: error: 'd' was not declared in this scope
   13 |   for(auto x:d){cout << x;}
      |              ^
a.cc:13:17: error: 'cout' was not declared in this scope
   13 |   for(auto x:d){cout << x;}
      |                 ^~~~
Language: C++

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

int main(void) {
    string s;
    vector<char> a;
    cin >> s;
    for (char c : s) {
        if (c == 'B') a.pop_back();
        else a.push_back(c)
    }
    for (char c : s) {
        cout << c;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: expected ';' before '}' token
   10 |         else a.push_back(c)
      |                            ^
      |                            ;
   11 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
  cin>>s;
  stack<char>S;
  int N=s.size();
  for(int i=0;i<N;i++){
  if(s.at(i)!='B')
    S.push(s.at(i));
    else {
    if(!S.empty())
      S.pop();
    }
  
  }int M=S.size();
  string ans="";
  for(int i=0;i<M;i++){
    ans=S.top()+ans;
    S.pop();
  }
  cout<<ans<<endl;
   return 0;
}
  cout<<ans<<endl;
   return 0;
}

Compiler output:
a.cc:25:3: error: 'cout' does not name a type
   25 |   cout<<ans<<endl;
      |   ^~~~
a.cc:26:4: error: expected unqualified-id before 'return'
   26 |    return 0;
      |    ^~~~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
  cin>>s;
  stack<char>S;
  int N=s.size();
  for(int i=0;i<N;i++){
  if(s.at(i)!='B')
    S.push(s.at(i));
    else {
    if(!S.empty())
      S.pop();
    }
  
  }int M=S.size();
  string ans="";
  for(int i=0;i<M;i++){
    ans=S.top()+ans;
    S.pop();
  }#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
  cin>>s;
  stack<char>S;
  int N=s.size();
  for(int i=0;i<N;i++){
  if(s.at(i)!='B')
    S.push(s.at(i));
    else {
    if(!S.empty())
      S.pop();
    }
  
  }int M=S.size();
  string ans="";
  for(int i=0;i<M;i++){
    ans=S.top()+ans;
  }
  cout<<ans<<endl;
   return 0;
}
  cout<<ans<<endl;
   return 0;
}

Compiler output:
a.cc:21:4: error: stray '#' in program
   21 |   }#include<bits/stdc++.h>
      |    ^
a.cc: In function 'int main()':
a.cc:21:5: error: 'include' was not declared in this scope
   21 |   }#include<bits/stdc++.h>
      |     ^~~~~~~
a.cc:21:13: error: 'bits' was not declared in this scope
   21 |   }#include<bits/stdc++.h>
      |             ^~~~
a.cc:21:18: error: 'stdc' was not declared in this scope; did you mean 'std'?
   21 |   }#include<bits/stdc++.h>
      |                  ^~~~
      |                  std
a.cc:22:1: error: expected primary-expression before 'using'
   22 | using namespace std;
      | ^~~~~
a.cc:23:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   23 | int main(){
      |         ^~
a.cc:23:9: note: remove parentheses to default-initialize a variable
   23 | int main(){
      |         ^~
      |         --
a.cc:23:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:23:11: error: a function-definition is not allowed here before '{' token
   23 | int main(){
      |           ^
Language: C

#include <stdio.h> 
 
int main （void ）{ 
	char s [ 1111 ]、a [ 1111 ] = {};
	int i 、n 、t = 0 ;
	
	scanf （"％s" 、s ）;
	
	n = strlen （s ）;
	
	for （i = 0 ; i < n ; i ++）{
		if （s [ i ] == '1' ）
		a [ t ++] = '1' ;
		if （s [ i ] == '0' ）
		a [ t ++] = '0' ;
		if （s [ i ] == 'B' ）{
			if （t ！= 0 ）
			a [ -t ] = '\ 0' ;
			
		}
		
	}
	
	printf （"％s \ n" 、a ）; 
}

Compiler output:
main.c:3:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '\U0000ff08void'
    3 | int main （void ）{
      |          ^~~~~~
main.c:3:10: error: unknown type name '\U0000ff08void'; did you mean 'void'?
    3 | int main （void ）{
      |          ^~~~~~
      |          void
main.c:4:24: error: stray '\343' in program
    4 |         char s [ 1111 ]<U+3001>a [ 1111 ] = {};
      |                        ^~~~~~~~
main.c:5:15: error: stray '\343' in program
    5 |         int i <U+3001>n <U+3001>t = 0 ;
      |               ^~~~~~~~
main.c:5:19: error: stray '\343' in program
    5 |         int i <U+3001>n <U+3001>t = 0 ;
      |                         ^~~~~~~~
main.c:7:23: error: stray '\343' in program
    7 |         scanf <U+FF08>"<U+FF05>s" <U+3001>s <U+FF09>;
      |                                   ^~~~~~~~
main.c:18:36: warning: unknown escape sequence: '\040'
   18 |                         a [ -t ] = '\ 0' ;
      |                                    ^~~~~
main.c:18:36: warning: multi-character character constant [-Wmultichar]
main.c:24:28: error: stray '\343' in program
   24 |         printf <U+FF08>"<U+FF05>s \ n" <U+3001>a <U+FF09>;
      |                                        ^~~~~~~~
Language: C

#include <stdio.h> 
 
int main （void ）{ 
	char s [ 1111 ]、a [ 1111 ] = {};
	int i 、n 、t = 0 ;
	
	scanf （"％s" 、s ）;
	
	n = strlen （s ）;
	
	for （i = 0 ; i < n ; i ++）{
		if （s [ i ] == '1' ）
		a [ t ++] = '1' ;
		if （s [ i ] == '0' ）
		a [ t ++] = '0' ;
		if （s [ i ] == 'B' ）{
			if （t ！= 0 ）
			a [ -t ] = '\ 0' ;
			
		}
		
	}
	
	printf （"％s \ n" 、a ）;
	0を返します。 
}

Compiler output:
main.c:3:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '\U0000ff08void'
    3 | int main （void ）{
      |          ^~~~~~
main.c:3:10: error: unknown type name '\U0000ff08void'; did you mean 'void'?
    3 | int main （void ）{
      |          ^~~~~~
      |          void
main.c:4:24: error: stray '\343' in program
    4 |         char s [ 1111 ]<U+3001>a [ 1111 ] = {};
      |                        ^~~~~~~~
main.c:5:15: error: stray '\343' in program
    5 |         int i <U+3001>n <U+3001>t = 0 ;
      |               ^~~~~~~~
main.c:5:19: error: stray '\343' in program
    5 |         int i <U+3001>n <U+3001>t = 0 ;
      |                         ^~~~~~~~
main.c:7:23: error: stray '\343' in program
    7 |         scanf <U+FF08>"<U+FF05>s" <U+3001>s <U+FF09>;
      |                                   ^~~~~~~~
main.c:18:36: warning: unknown escape sequence: '\040'
   18 |                         a [ -t ] = '\ 0' ;
      |                                    ^~~~~
main.c:18:36: warning: multi-character character constant [-Wmultichar]
main.c:24:28: error: stray '\343' in program
   24 |         printf <U+FF08>"<U+FF05>s \ n" <U+3001>a <U+FF09>;
      |                                        ^~~~~~~~
main.c:25:9: error: invalid suffix "を返します" on integer constant
   25 |         0を返します。
      |         ^~~~~~~~~~~
main.c:25:20: error: stray '\343' in program
   25 |         0<U+3092><U+8FD4><U+3057><U+307E><U+3059><U+3002>
      |                                                  ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
    vector<char>v;
    string s;
    cin>>s;
    int n=s.length();
v.push_back("");
    for(int i=0;i<n;i++)
    {
        if(s[i+1]!='B' && s[i]!='B')
        {
            v.push_back(s[i]);
        }

    }
    for(int i=0;i<v.size();i++)
    {
        cout<<v[i];
    }
    v.clear();
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: no matching function for call to 'push_back(const char [1])'
   10 | v.push_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:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = char; _Alloc = std::allocator<char>; value_type = char]' (near match)
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   conversion of argument 1 would be ill-formed:
a.cc:10:13: error: invalid conversion from 'const char*' to 'std::vector<char>::value_type' {aka 'char'} [-fpermissive]
   10 | v.push_back("");
      |             ^~
      |             |
      |             const char*
/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]' (near match)
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   conversion of argument 1 would be ill-formed:
a.cc:10:13: error: invalid conversion from 'const char*' to 'std::vector<char>::value_type' {aka 'char'} [-fpermissive]
   10 | v.push_back("");
      |             ^~
      |             |
      |             const char*
Language: C++

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

int main() {
  string s;
  cin >> s;
  deque<int> n;
  for (int i=0; i<s.size(); i++) {
    if (s.at(i)=='0') n.push_back(0);
    else if (s.at(i)=='1') n.push_back(1);
    else if(!s.empty()) n.pop_back();
  }
  for (int i=0; i<n.size(); i++) cout << n.at(i);
  cou

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'cou' was not declared in this scope; did you mean 'cos'?
   14 |   cou
      |   ^~~
      |   cos
a.cc:14:6: error: expected '}' at end of input
   14 |   cou
      |      ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(0);
#define ll long long
#define endl '\n'

using namespace std;

main()
{
  fast;
  string s;
  int i;
  stack<char> p;
  for (i=0;i<s.size();i++)
  {
    if (s[i]=='0')
      p.push(s[i]);
    else if (s[i]=='1')
      p.push(s[i]);
    else if (s[i]=='B' && !p.empty())
      p.pop();
  }
  string ans="";
  char f;
  while (!p.empty)
  {
    f=p.top();
    p.pop();
    ans=f+ans;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:25:13: error: cannot convert 'std::stack<char>::empty' from type 'bool (std::stack<char>::)() const' to type 'bool'
   25 |   while (!p.empty)
      |             ^~~~~
a.cc:25:13: error: in argument to unary !
   25 |   while (!p.empty)
      |           ~~^~~~~
Language: C++

#include<iostream>

#include<stack>

#include<vector>

using namespace std;

int main(){

string str;

cin>>str;

stack<int>stc;

for(int i=0;i<str.size();i++){

  if(str[i]=='0') stc.push(0);

  if(str[i]=='1') stc.push(1);

  if(str[i]=='B'&& stc.size()>0){

        stc.pop();

 }

}

vector<int>is;

 while(!stc.empty()){

     is.push_back(stc.top());

   stc.pop();

 }

 reverse(is.begin(),is.end());

 for(auto i : is) cout<<i;

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:2: error: 'reverse' was not declared in this scope
   41 |  reverse(is.begin(),is.end());
      |  ^~~~~~~
Language: C++

#include <bits/stdc++.h>
 
/*
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <ctype.h>
*/
using namespace std;
void init(){
    cin.tie(0);
    cin.sync_with_stdio(0);
}


int main() {
    init();
string s,c="";
cin>>s;

for(int i=0;i<s.size();i++){
    if(s[i]!='B'){

    c+=s[i];
}
else if(c.size()!=0){
    c.pop_back();
}

}
cout<<c<<endl();
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:14: error: no matching function for call to 'endl()'
   40 | cout<<c<<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: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::endl(basic_ostream<_CharT, _Traits>&)'
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
/usr/include/c++/14/ostream:744:5: note:   candidate expects 1 argument, 0 provided
Language: C++

#include <bits/stdc++.h>
#include <string>
using namespace std;
void init(){
    cin.tie(0);
    cin.sync_with_stdio(0);
}


int main() {
    init();
string s,c="";
cin>>s;

for(int i=0;i<s.size();i++){
    if(s[i]=='B'){
            if(c.size()==0){
                continue;
            }
            else
        c.pop_back();
    }}
    else if(s[i]=='1')
{
    c+='1';
}
else if(s[i]=='0'){
    cout<<'0';
    c+='0';
}

}
cout<<c;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: 'else' without a previous 'if'
   23 |     else if(s[i]=='1')
      |     ^~~~
a.cc:23:15: error: 'i' was not declared in this scope
   23 |     else if(s[i]=='1')
      |               ^
a.cc: At global scope:
a.cc:33:1: error: 'cout' does not name a type
   33 | cout<<c;
      | ^~~~
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: 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>]'
   12 |     else t.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: Java

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

public class p9 {
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        String str=s.nextLine();
        Stack<Character> st=new Stack<>();
        for(int i=0;i<str.length();i++){
            char c=str.charAt(i);
            if(c!='B'){
                st.push(c);
            }
            else{
                if(!st.isEmpty()){
                    st.pop();
                }
            }
        }
        StringBuilder ans=new StringBuilder();
        while(!st.isEmpty()){
            ans.append(st.pop());
        }
        System.out.println(ans);
    }
}


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

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

Compiler output:
main.c: In function 'main':
main.c:10:3: error: 'else' without a previous 'if'
   10 |   else{
      |   ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:3: error: 'else' without a previous 'if'
   10 |   else{
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
#include<bitset>
 
using namespace std;
 
#define M 1000000007
#define pb push_back
#define f first
#define s second
#define rep(i, st, ed) for(int i=st; i<ed; i++)
#define repn(i, st, ed) for(int i=st; i<=ed; i++)
 
 
typedef long long ll;
typedef unsigned long long int llt;
 
const int N = 5e5 + 10;
 
vector<int> g[N];
bool viss[N];
int vis[N];
 
void dfs(int curr, int par)
{
  for(auto x: g[curr])
    if(x != par)
      dfs(x, curr);
}
 
void dfs1(int curr, int par)
{
  viss[curr] = 1;
  for(auto x: g[curr])
    if(!viss[x])
      dfs1(x, curr);
}
 
void dfs2(int curr, int par, int num)
{
  vis[curr] = num;
  for(auto x: g[curr])
    if(vis[x] == 0)
      dfs2(x, curr, num);
}
 
ll fxor(ll n)
{
  if(n < 0) return 0;
  if(n % 4 == 3) return 0;
  else if(n % 4 == 0) return n;
  else if(n % 4 == 1) return n^(n-1);
  else if(n%4 == 2) return n^(n-1)^(n-2);
}
 
llt ppow(llt x, llt y)
{
  llt res = 1;
  while(y > 0){
    if(y&1)
      res = (res * x)%M;
    y = y >> 1;
    x = (x * x)%M;
  }
  return res;
}
 
string ans ="";
void convert10tob(llt N, int b)
{
     if (N == 0)
        return;
     int x = N % b;
     N /= b;
     if (x < 0)
        N += 1;
     convert10tob(N, b);
     ans += to_string(x);
     return;
}
 
llt convertback(string a, int b)
{
  llt aa = 0;
  llt mul = 1;
  for(int i=a.length()-1; i>=0; i--)
  {
    int curr = a[i] - '0';
    aa += (curr * mul);
    mul *= b;
  }
  return aa;
}
 
int main()
{
string s,ans="";
  cin>>s;
  rep(i,0,s.length())
  {
    if(s[i]=='0')
       ans+='0';
    else if(s[i]=='1')
      ans+='1';
    else
      ans.pop();
  }
  cout<<ans;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:105:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'pop'
  105 |       ans.pop();
      |           ^~~
a.cc: In function 'll fxor(ll)':
a.cc:53:1: warning: control reaches end of non-void function [-Wreturn-type]
   53 | }
      | ^
Language: C++

#include <iostream>
#include <string>

int main()
{
  std::string s;
  std::cin >> s;
  int i;
  std::string ans = "";
  for (i = 0; i < s.size(); i++) {
    if (s[i] == '0' || s[i] == '1') ans += s[i];
    if (s[i] == 'B') ans.pop_back;
  }
  std::cout << ans;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: 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>]'
   12 |     if (s[i] == 'B') ans.pop_back;
      |                      ~~~~^~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:2174:7: note: declared here
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
Language: C++

#include <iostream>
#include <string>

int main()
{
  str s;
  std::cin >> s;
  int i;
  std::str ans = "";
  for (i = 0; i < s.size(); i++) {
    if (s[i] == '0' || s[i] == '1') ans += s[i];
    if (s[i] == 'B') ans.pop_back;
  }
  std::cout << ans;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |   str s;
      |   ^~~
      |   std
a.cc:7:15: error: 's' was not declared in this scope
    7 |   std::cin >> s;
      |               ^
a.cc:9:8: error: 'str' is not a member of 'std'
    9 |   std::str ans = "";
      |        ^~~
a.cc:11:37: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     if (s[i] == '0' || s[i] == '1') ans += s[i];
      |                                     ^~~
      |                                     abs
a.cc:12:22: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |     if (s[i] == 'B') ans.pop_back;
      |                      ^~~
      |                      abs
a.cc:14:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |   std::cout << ans;
      |                ^~~
      |                abs
Language: C++

#include <iostream>
#include <string>

int main()
{
  int s;
  char ch;
  std::string str = "";
  for (i = 0; i < s; i++) {
    std::cin >> ch;
    if (ch == '1' || ch == '0') str += ch;
    if (ch == 'B') str.pop_back();
    std::cout << str;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'i' was not declared in this scope
    9 |   for (i = 0; i < s; i++) {
      |        ^
Language: C++

#include <iostream>
#include <string>

int main()
{
  int s;
  char ch;
  std::string str = "";
  for (i = 0; i < s; i++) {
    std::cin >> ch;
    if (ch == '1' || ch == '0') s += ch;
    if (ch == 'B') s.pop_back();
    std::cout << str;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'i' was not declared in this scope
    9 |   for (i = 0; i < s; i++) {
      |        ^
a.cc:12:22: error: request for member 'pop_back' in 's', which is of non-class type 'int'
   12 |     if (ch == 'B') s.pop_back();
      |                      ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i<(n); ++i)
using namespace std;
using ll=long long;
int main(){
    string s;
    cin>>s;
    deque<char>q;
    rep(i,s.length()){
        if(s[i]=='0'||s[i]=='1'){
            q.push_back(s[i]);
        }
        else{
            if(q.empty){
                continue;
            }
            else{
                q.pop_back();
            }
        }
    }
    for(char ss:q){
        cout<<ss;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: cannot convert 'std::deque<char>::empty' from type 'bool (std::deque<char>::)() const noexcept' to type 'bool'
   14 |             if(q.empty){
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define  rep(i, n) for(int i = 0; i < n; i++) 
#define  all(x) (x).begin(),(x).end()     // 昇順ソート
#define  rall(v) (v).rbegin(), (v).rend() // 降順ソート
#define  INF 1LL << 60
typedef long long int LL;
typedef long long int ll;
#define pll pair<ll, ll>
#define F first
#define S second
const int MOD = 1000000007;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return true; } return false; }
//sort(all(x))とするとソートできるよ
// 10^x は pow(10,(x)) 
// 任意のlogは　対数の底の変換を使う    log(N) / log(任意の底)

int main(){
    string s;cin >> s;
    deque<char> ans;

    rep(i,s.size()){
        if(ans.size() == 0 && s[i] == 'B')continue;
        else if(s[i] == 'B'){
            ans.pop_back();
        }
        else if(s[i] == '0'){
            ans.push_back('0');
        }
        else if(s[i] == '1'){
            ans.push_back('1');
        }
    }


    for(auto t : ans){
        cout << t <<;
    }

    cout <<  endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:21: error: expected primary-expression before ';' token
   38 |         cout << t <<;
      |                     ^
Language: C++

#include<bits/stdc++.h>
 
using namespace std;
 
 
#define mod(cans) cans%10**9+7
#define debug(x) cout << "Debug" << x << "\n"
#define rep(i,n) for(int i=0;i<n;i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define cin_pl(n,x) rep(i,n){cin>>x[i];}
#define cins(s,n) rep(i,n)cin>>s.at[i];
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define prians(Answer) cout<<Answer<<"\n"
#define TF(X) X==1?cout<<"Yes\n":cout<<"No\n"
#define elcon else{continue;}
 
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<vector<int> > matrix;
typedef pair<int,int> pii;
typedef vector<pii> vpi;
typedef greater<int> gi;
typedef vector<unsigned> vu;


ll gcd(ll x, ll y) { return (y == 0) ? x : gcd(y, x % y); }
bool is_prime(const unsigned n){
    switch(n){
        case 0:
        case 1: return false;
        case 2: return true;
    }
 
 
    for(unsigned i=2;i<n;++i){
        if(n%i == 0) return false;
    }
 
    return true;
}

int main()
{
    string s,ans="";
    cin>>s;
    rep(i,s.size())
    {
        if(s[i]=='0')ans+='0';
        else if(s[i]=='1')ans+='1';
        else if(s[i]=='B'&&ans.size>0){ans.pop_back();}
    }
    cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:32: 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 '()' ?)
   54 |         else if(s[i]=='B'&&ans.size>0){ans.pop_back();}
      |                            ~~~~^~~~
      |                                    ()
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  string ans = "";
  for (int i = 0; i < size.S(); i++) {
    if (S[i] == '0') {
      ans += "0";
    }
    else if (S[i] == '1') {
      ans += "1";
    }
    else {
      if (ans.size() != 0) {
        ans = ans.substr(0,ans.size() - 1);
      }
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: overloaded function with no contextual type information
    7 |   for (int i = 0; i < size.S(); i++) {
      |                            ^