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

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

int main(){
  int H,W;
  cin>>H>>W;
  
  vector<vector<char>> date(H,vector<char>(W));
  
  
  for(int i=0;i<H;i++){
    
    for(int j=0;j<W;j++){
      cin>>date.at(i).at(j);
    }
  }
  
  
  for(int i=0;i<H;i++){
    
    int sum=0;
    
    for(int j=0;j<W;j++){
      　
      if(date.at(i).at(j)=='.'){
        sum++;
        
        if(j==W-1&&sum==W){
          for(int k=0;k<W;k++){
            date.at(i).at(k)=' ';
      }
    }
    }
  }
  }
  
    
  
  for(int i=0;i<W;i++){
    
    int sum=0;
    
    for(int j=0;j<H;j++){
      　
      if(date.at(j).at(i)=='.'){
        sum++;
        
        if(j==H-1&&sum==H){
          for(int k=0;k<H;k++){
            date.at(k).at(i)=" ";
      }
    }
      
    }
  }
  }
  
      for(int i=0;i<date.size();i++){
        for(int j=0;j<date.at(0).size();j++){
          cout<<date.at(i).at(j)<<endl;
        }
      }
    }
    



Compiler output:
a.cc:24:7: error: extended character 　 is not valid in an identifier
   24 |       　
      |       ^
a.cc:44:7: error: extended character 　 is not valid in an identifier
   44 |       　
      |       ^
a.cc: In function 'int main()':
a.cc:24:7: error: '\U00003000' was not declared in this scope
   24 |       　
      |       ^~
a.cc:44:7: error: '\U00003000' was not declared in this scope
   44 |       　
      |       ^~
Language: C++

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

int main(){
  int H,W;
  cin>>H>>W;
  
  vector<vector<char>> date(H,vector<char>(W));
  
  
  for(int i=0;i<H;i++){
    
    for(int j=0;j<W;j++){
      cin>>date.at(i).at(j);
    }
  }
  
  
  for(int i=0;i<H;i++){
    
    int sum=0;
    
    for(int j=0;j<W;i++){
      　
      if(date.at(i).at(j)=='.'){
        sum++;
        
        if(j==W-1&&sum==W){
          for(int k=0;k<W;k++){
            date.at(i).at(k)=' ';
      }
    }
    }
  }
  }
  
    
  
  for(int i=0;i<W;i++){
    
    int sum=0;
    
    for(int j=0;j<H;i++){
      　
      if(date.at(i).at(j)=='.'){
        sum++;
        
        if(j==H-1&&sum==H){
          for(int k=0;k<H;k++){
            date.at(i).at(k)=" ";
      }
    }
      
    }
  }
  }
  
    
      
      for(int i=0;i<date.size();i++){
        for(int j=0;j<date.at(0).size();j++){
          cout<<date.at(i).at(j)<<endl;
        }
      }
    }
    



Compiler output:
a.cc:24:7: error: extended character 　 is not valid in an identifier
   24 |       　
      |       ^
a.cc:44:7: error: extended character 　 is not valid in an identifier
   44 |       　
      |       ^
a.cc: In function 'int main()':
a.cc:24:7: error: '\U00003000' was not declared in this scope
   24 |       　
      |       ^~
a.cc:44:7: error: '\U00003000' was not declared in this scope
   44 |       　
      |       ^~
Language: C++

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

int main(){
  int H,W;
  cin>>H>>W;
  
  vector<vector<char>> date(H,vector<char>(W));
  
  
  for(int i=0;i<H;i++){
    
    for(int j=0;j<W;j++){
      cin>>date.at(i).at(j);
    }
  }
  
  
  for(int i=0;i<H;i++){
    
    int sum=0;
    
    for(int j=0;j<W;i++){
      　
      if(date.at(i).at(j)=='.'){
        sum++;
        
        if(j==W-1&&sum==W){
          for(int k=0;k<W;K++){
            date.at(i).at(k)=' ';
      }
    }
    }
  }
  }
  
    
  
  for(int i=0;i<W;i++){
    
    int sum=0;
    
    for(int j=0;j<H;i++){
      　
      if(date.at(i).at(j)=='.'){
        sum++;
        
        if(j==H-1&&sum==H){
          for(int k=0;k<H;K++){
            date.at(i).at(k)=" ";
      }
    }
      
    }
  }
  }
  
    
      
      for(int i=0;i<date.size();i++){
        for(int j=0;j<date.at(0).size();j++){
          cout<<date.at(i).at(j)<<endl;
        }
      }
    }
    



Compiler output:
a.cc:24:7: error: extended character 　 is not valid in an identifier
   24 |       　
      |       ^
a.cc:44:7: error: extended character 　 is not valid in an identifier
   44 |       　
      |       ^
a.cc: In function 'int main()':
a.cc:24:7: error: '\U00003000' was not declared in this scope
   24 |       　
      |       ^~
a.cc:44:7: error: '\U00003000' was not declared in this scope
   44 |       　
      |       ^~
Language: C++


    

    
    
    
    
    

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

int main(){
  int H,W;
  cin>>H>>W;
  
  vector<vector<char>> date(H,vector<char>(W));
  
  
  for(int i=0;i<H;i++){
    
    for(int j=0;j<W;j++){
      cin>>date.at(i).at(j);
    }
  }
  
  
  for(int i=0;i<H;i++){
    
    int sum=0;
    
    for(int j=0;j<W;i++){
      　
      if(date.at(i).at(j)=='.'){
        sum++;
        
        if(j==W-1&&sum==W){
          for(int k=0;k<W){
            date.at(i).at(k)=' ';
      }
    }
    }
  }
  }
  
    
  
  for(int i=0;i<W;i++){
    
    int sum=0;
    
    for(int j=0;j<H;i++){
      　
      if(date.at(i).at(j)=='.'){
        sum++;
        
        if(j==H-1&&sum==H){
          for(int k=0;k<H){
            date.at(i).at(k)=" ";
      }
    }
      
    }
  }
  }
  
    
      
      for(int i=0;i<date.size();i++){
        for(int j=0;j<date.at(0).size();j++){
          cout<<date.at(i).at(j)<<endl;
        }
      }
    }
    



Compiler output:
a.cc:33:7: error: extended character 　 is not valid in an identifier
   33 |       　
      |       ^
a.cc:53:7: error: extended character 　 is not valid in an identifier
   53 |       　
      |       ^
a.cc: In function 'int main()':
a.cc:33:7: error: '\U00003000' was not declared in this scope
   33 |       　
      |       ^~
a.cc:53:7: error: '\U00003000' was not declared in this scope
   53 |       　
      |       ^~
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define _for(i,j,N) for(int i = (j);i < (N);i++)
#define _rep(i,j,N) for(int i = (j);i <= (N);i++)
#define ALL(x) x.begin(),x.end()
#define PB push_back
#define LL long long

template<typename T>
ostream& operator<<(ostream& os,const vector<T>& v) {
    _for(i,0,v.size()) os << v[i] << " ";
    return os;
}

template<typename T>
ostream& operator<<(ostream& os,const set<T>& v){
    for(typename set<T>::iterator it = v.begin();it != v.end();it++)
    os << *it <<" ";
    return os;
}

const int maxn = 105;

char G[maxn][maxn];
int row[maxn];
int line[maxn];

int main()
{
    int H,W;
    cin >> H >> W;getchar();
    _for(i,0,H){
        gets(G[i]);
    }



    _for(i,0,H){
        _for(j,0,W){
            if(G[i][j] == '#'){
                row[i] = 1;
                line[j] = 1;
            }
        }
    }
    _for(i,0,H){
        if(!row[i])continue;
        _for(j,0,W){
            if(!line[j]) continue;
            printf("%c",G[i][j]);
        }
        printf("\n");
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   34 |         gets(G[i]);
      |         ^~~~
      |         getw
Language: C++

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

int main()
{
    int H, W;
    cin >> H >> W;
    vector<int> a(H);
    for (int i = 0; i < H; i++)
    {
        cin >> a[i];
    }
    
    vector<bool> row(H, false);
    vector<bool> col(W, false);

    for (int i = 0; i < H; i++)
    {
        if (row[i])
        {
            for (int j = 0; j < W; j++)
            {
                if (col[W])
                {
                    cout << a[i][j];
                }
            }
            cout << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:33: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
   25 |                     cout << a[i][j];
      |                                 ^
Language: C++

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

int main(){
  int H, W;
  cin >> H >> W;
  vector<vector<char>> data(H, vector<char>(W));
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> data[i][j];
    }
  }
  vector<int> h(H);
  int x = -1;
  vector<int> w(W);
  int y = -1;
  for(int i = 0; i < H; i++){
    for(int j = 0, j < W; j++){
      if(data[i][j] == '#'){
        x++;
        h[x] = i;
        break;
      }
    }
  }
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      if(data[j][i] == '#'){
        y++;
        w[y] = i;
        break;
      }
    }
  }
  vector<vector<char>> z(x+1, vector<char>(y+1));
  for(int i = 0; i <= x; i++){
    for(int j = 0; j <= y; j++){
      z[i][j] = data[h[i]][w[i]];
    }
  }
  for(int i = 0; i <= x; i++){
    for(int j = 0; j <= y; j++){
      cout << z[i][j];
    }
    cout << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: expected ';' before '<' token
   18 |     for(int j = 0, j < W; j++){
      |                     ^~
      |                     ;
a.cc:18:22: error: expected primary-expression before '<' token
   18 |     for(int j = 0, j < W; j++){
      |                      ^
Language: C++

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

int main(){
  int H, W;
  cin >> H >> W;
  vector<vector<char>> data(H, vector<char>(W));
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> data[i][j];
    }
  }
  vector<int> h(H);
  int x = -1;
  vector<int> w(W);
  int y = -1;
  for(int i = 0; i < H; i++){
    for(int j = 0, j < W; j++){
      if(data[i][j] == '#'){
        x++;
        h[x] = i;
        break;
      }
    }
  }
  for(int i = 0; i < H; i++){
    for(int j = 0, j < W; j++){
      if(data[j][i] == '#'){
        y++;
        w[y] = i;
        break;
      }
    }
  }
  vector<vector<char>> z(x+1, vector<char>(y+1));
  for(int i = 0; i <= x; i++){
    for(int j = 0; j <= y; j++){
      z[i][j] = data[h[i]][w[i]];
    }
  }
  for(int i = 0; i <= x; i++){
    for(int j = 0; j <= y; j++){
      cout << z[i][j];
    }
    cout << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: expected ';' before '<' token
   18 |     for(int j = 0, j < W; j++){
      |                     ^~
      |                     ;
a.cc:18:22: error: expected primary-expression before '<' token
   18 |     for(int j = 0, j < W; j++){
      |                      ^
a.cc:27:21: error: expected ';' before '<' token
   27 |     for(int j = 0, j < W; j++){
      |                     ^~
      |                     ;
a.cc:27:22: error: expected primary-expression before '<' token
   27 |     for(int j = 0, j < W; j++){
      |                      ^
Language: C++

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

int main(){
  int H, W;
  cin >> H >> W;
  vector<vector<char>> data(H, vector<char>(W));
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> data[i][j];
    }
  }
  vector<int> h(H);
  int x = -1;
  vector<int> w(W);
  int y = -1
  for(int i = 0; i < H; i++){
    for(int j = 0, j < W; j++){
      if(data[i][j] == '#'){
        x++;
        h[x] = i;
        break;
      }
    }
  }
  for(int i = 0; i < H; i++){
    for(int j = 0, j < W; j++){
      if(data[j][i] == '#'){
        y++;
        w[y] = i;
        break;
      }
    }
  }
  vector<vector<char>> z(x+1, vector<char>(y+1));
  for(int i = 0; i <= x; i++){
    for(int j = 0; j <= y; j++){
      z[i][j] = data[h[i]][w[i]];
    }
  }
  for(int i = 0; i <= x; i++){
    for(int j = 0; j <= y; j++){
      cout << z[i][j];
    }
    cout << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: expected ',' or ';' before 'for'
   17 |   for(int i = 0; i < H; i++){
      |   ^~~
a.cc:17:18: error: 'i' was not declared in this scope
   17 |   for(int i = 0; i < H; i++){
      |                  ^
a.cc:27:21: error: expected ';' before '<' token
   27 |     for(int j = 0, j < W; j++){
      |                     ^~
      |                     ;
a.cc:27:22: error: expected primary-expression before '<' token
   27 |     for(int j = 0, j < W; j++){
      |                      ^
Language: C++

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

int main(){
  int H, W;
  cin >> H >> W;
  vector<vector<char>> data(H, vector<char>(W));
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> data[i][j];
    }
  }
  vector<int> h(H);
  int x = -1;
  vector<int> w(W);
  int y = -1
  for(int i = 0; i < H; i++){
    for(int j = 0, j < W; j++){
      if(data[i][j] == '#'){
        x++;
        h[x] = i;
        break;
      }
    }
  }
  for(int i = 0; i < H; i++){
    for(int j = 0, j < W; j++){
      if(data[j][i] == '#'){
        y++;
        w[y] = i;
        break;
      }
    }
  }
  vector<vector<char>> z(x+1, vector<char>(y+1))
  for(int i = 0; i <= x; i++){
    for(int j = 0; j <= y; j++){
      z[i][j] = data[h[i]][w[i]];
    }
  }
  for(int i = 0; i <= x; i++){
    for(int j = 0; j <= y; j++){
      cout << z[i][j];
    }
    cout << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: expected ',' or ';' before 'for'
   17 |   for(int i = 0; i < H; i++){
      |   ^~~
a.cc:17:18: error: 'i' was not declared in this scope
   17 |   for(int i = 0; i < H; i++){
      |                  ^
a.cc:27:21: error: expected ';' before '<' token
   27 |     for(int j = 0, j < W; j++){
      |                     ^~
      |                     ;
a.cc:27:22: error: expected primary-expression before '<' token
   27 |     for(int j = 0, j < W; j++){
      |                      ^
a.cc:36:3: error: expected ',' or ';' before 'for'
   36 |   for(int i = 0; i <= x; i++){
      |   ^~~
Language: C++

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

int main(){
  int H, W;
  cin >> H >> W;
  vector<vector<char> data(H, vector<char>(W));
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> data[i][j];
    }
  }
  vector<int> h(H);
  int x = -1;
  vector<int> w(W);
  int y = -1
  for(int i = 0; i < H; i++){
    for(int j = 0, j < W; j++){
      if(data[i][j] == '#'){
        x++;
        h[x] = i;
        break;
      }
    }
  }
  for(int i = 0; i < H; i++){
    for(int j = 0, j < W; j++){
      if(data[j][i] == '#'){
        y++;
        w[y] = i;
        break;
      }
    }
  }
  vector<vector<char> z(x+1, vector<char>(y+1))
  for(int i = 0; i <= x; i++){
    for(int j = 0; j <= y; j++){
      z[i][j] = data[h[i]][w[i]];
    }
  }
  for(int i = 0; i <= x; i++){
    for(int j = 0; j <= y; j++){
      cout << z[i][j];
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:46: error: template argument 1 is invalid
    7 |   vector<vector<char> data(H, vector<char>(W));
      |                                              ^
a.cc:7:46: error: template argument 2 is invalid
a.cc:10:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   10 |       cin >> data[i][j];
      |                  ^
a.cc:17:3: error: expected ',' or ';' before 'for'
   17 |   for(int i = 0; i < H; i++){
      |   ^~~
a.cc:17:18: error: 'i' was not declared in this scope
   17 |   for(int i = 0; i < H; i++){
      |                  ^
a.cc:27:21: error: expected ';' before '<' token
   27 |     for(int j = 0, j < W; j++){
      |                     ^~
      |                     ;
a.cc:27:22: error: expected primary-expression before '<' token
   27 |     for(int j = 0, j < W; j++){
      |                      ^
a.cc:28:14: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   28 |       if(data[j][i] == '#'){
      |              ^
a.cc:36:15: error: template argument 1 is invalid
   36 |   for(int i = 0; i <= x; i++){
      |               ^
a.cc:36:15: error: template argument 2 is invalid
a.cc:43:15: error: 'z' was not declared in this scope
   43 |       cout << z[i][j];
      |               ^
Language: C++

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

int main(){
  int H, W;
  cin >> H >> W;
  vector<vector<char>> a(H, vector<char>(W,'.'));
  
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> a.at(i).at(j); 
    }
  }

  vector<bool> blanckH(H, false), blanckW(W, false);
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      if(a.at(i).at(j) == '#'){
        blankH.at(i) = true;
        blankW.at(j) = true;
      }
    }
  }
  
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      if(blankH.at(i) && blanckW.at(j)){
        cout << a.at(i).at(j);
        if(i != H-1 && j == W-1)cout << endl;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'blankH' was not declared in this scope; did you mean 'blanckH'?
   19 |         blankH.at(i) = true;
      |         ^~~~~~
      |         blanckH
a.cc:20:9: error: 'blankW' was not declared in this scope; did you mean 'blanckW'?
   20 |         blankW.at(j) = true;
      |         ^~~~~~
      |         blanckW
a.cc:27:10: error: 'blankH' was not declared in this scope; did you mean 'blanckH'?
   27 |       if(blankH.at(i) && blanckW.at(j)){
      |          ^~~~~~
      |          blanckH
Language: C++

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

int main(){
  int H, W;
  cin >> H >> W;
  vector<vector<char>> a(H, vector<char>(W,'.'));
  
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> a.at(i).at(j); 
    }
  }

  vector<bool> blanckH(H, false), blanckW(W, false);
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      if(a.at(i).at(j) == "#"){
        blankH.at(i) = true;
        blankW.at(j) = true;
      }
    }
  }
  
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      if(blankH.at(i) && blanckW.at(j)){
        cout << a.at(i).at(j);
        if(i != H-1 && j == W-1)cout << endl;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       if(a.at(i).at(j) == "#"){
      |          ~~~~~~~~~~~~~~^~~~~~
a.cc:19:9: error: 'blankH' was not declared in this scope; did you mean 'blanckH'?
   19 |         blankH.at(i) = true;
      |         ^~~~~~
      |         blanckH
a.cc:20:9: error: 'blankW' was not declared in this scope; did you mean 'blanckW'?
   20 |         blankW.at(j) = true;
      |         ^~~~~~
      |         blanckW
a.cc:27:10: error: 'blankH' was not declared in this scope; did you mean 'blanckH'?
   27 |       if(blankH.at(i) && blanckW.at(j)){
      |          ^~~~~~
      |          blanckH
Language: C++

#include<iostream>

using namespace std;

int main(){
  int i,j;
  int a,b,k,c1[100],c2[100];
  char g[100][100];
  
  for(a=0;a<100;a++){
    c1[a]=0;
    c2[a]=0;
  }
  
  cin>>i>>j;
  for(a=0;a<i,a++){
    for(b=0;b<j;b++){
      cin>>g[a][b];
    }
  }
  
  for(a=0;a<i,a++){
    for(b=0;b<j;b++){
      if(g[a][b]=='.'){
        c1[a]++;
        c2[b]++;
      }
    }
  }
  
  for(a=0;a<i,a++){
    if(c1[a]==i)
      continue;
    else{
    for(b=0;b<j;b++){
      if(c2[b]==j)
        continue;
      else
        cout<<c[a][b];
    }
    cout<<endl;}
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: expected ';' before ')' token
   16 |   for(a=0;a<i,a++){
      |                  ^
      |                  ;
a.cc:22:18: error: expected ';' before ')' token
   22 |   for(a=0;a<i,a++){
      |                  ^
      |                  ;
a.cc:31:18: error: expected ';' before ')' token
   31 |   for(a=0;a<i,a++){
      |                  ^
      |                  ;
a.cc:39:15: error: 'c' was not declared in this scope
   39 |         cout<<c[a][b];
      |               ^
Language: C++

#include<iostream>

using namespace std;

int main(){
  int i,j;
  int a,b,k,c1[100],c2[100];
  char g[100][100];
  
  for(a=0;a<100;a++){
    c1[a]=0;
    c2[a]=0;
  }
  
  cin>>i>>j;
  for(a=0;a<i,a++){
    for(b=0;b<i;b++){
      cin>>g[a][b];
    }
  }
  
  for(a=0;a<i,a++){
    k=0;
    for(b=0;b<i;b++){
      if(g[a][b]=='.'){
        k++;
        c[b]++;
      }
    }
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: expected ';' before ')' token
   16 |   for(a=0;a<i,a++){
      |                  ^
      |                  ;
a.cc:22:18: error: expected ';' before ')' token
   22 |   for(a=0;a<i,a++){
      |                  ^
      |                  ;
a.cc:27:9: error: 'c' was not declared in this scope
   27 |         c[b]++;
      |         ^
Language: C++

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

int main() {
  int h,w;
  cin >> h >> w;
  vector<vector<char>> date(h, vector<char>(w));
  for(int i = 0; i<h ; i++){
    for(int j=0; j<w; j++){
      cin >> date.at(i).at(j);
    }
  }
  
  for(int i=0; i<h; i++){
    int x = 0;
    for(int j=0; j<w ; j++){
      if(date.at(i).at(0) == date.at(i).at(j)){
        x++;
      }
    }
    if(x == w){
      for(int j=0; j<w ; j++){
        date.at(i).at.(j) = '@';
      }
    }
  }
  for(int j=0; j<w;j++){
    int x = 0;
    for(int i=0; i<h ; i++){
      if(date.at(0).at(j) == date.at(i).at(j) || date.at(i).at(j) == '@'){
        x++;
      }
    }
    if(x == h){
      for(int i=0; i<h ; i++){
        date.at(i).at.(j) = '@';
      }
    }
  }
  
  for(int i=0; i<h; i++){
    for(int j=0; j<w ; j++){
      if(date.at(i).at(j) != '@'){
       cout << date.at(i).at(j);
      }
      if(j == w-1){
        cout << endl;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:20: error: invalid use of member function 'std::vector<char>::at' (did you forget the '()' ?)
   23 |         date.at(i).at.(j) = '@';
      |         ~~~~~~~~~~~^~
a.cc:36:20: error: invalid use of member function 'std::vector<char>::at' (did you forget the '()' ?)
   36 |         date.at(i).at.(j) = '@';
      |         ~~~~~~~~~~~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H, W;
  cin >> H >> W;
  vector<vector<char>>A(H,vector<char>(W));
  vector<vector<bool>>B(H,vector<bool>(W,false));
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      cin >> A.at(i).at(j);
    }
  }
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (
        for (int k = 0; k < H; k++) {
          B.at(k).at(j) == '#';
        }
        ||
        for (int k = 0; k < W; k++) {
          B.at(i).at(k) == '#';
      ) {
        B.at(i).at(j) = true;
      }
    }
  }
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (B.at(i).at(j)) {
        cout << A.at(i).at(j);
      }
      if(j == W-1) {
        cout << endl;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: expected primary-expression before 'for'
   17 |         for (int k = 0; k < H; k++) {
      |         ^~~
a.cc:16:11: error: expected ')' before 'for'
   16 |       if (
      |          ~^
      |           )
   17 |         for (int k = 0; k < H; k++) {
      |         ~~~
a.cc:17:25: error: 'k' was not declared in this scope
   17 |         for (int k = 0; k < H; k++) {
      |                         ^
a.cc:20:9: error: expected primary-expression before '||' token
   20 |         ||
      |         ^~
a.cc:21:9: error: expected primary-expression before 'for'
   21 |         for (int k = 0; k < W; k++) {
      |         ^~~
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H, W;
  cin >> H >> W;
  vector<vector<char>>A(H,vector<char>(W));
  vector<vector<bool>>B(H,vector<bool>(W,false));
  for (int i = 0; i < H, i++) {
    for (int j = 0; j < W, j++) {
      cin >> A.at(i).at(j);
    }
  }
  for (int i = 0; i < H, i++) {
    for (int j = 0; j < W, j++) {
      if (
        for (int k = 0; k < H, k++) {
          B.at(k).at(j) == '#';
        }
        ||
        for (int k = 0; k < W, k++) {
          B.at(i).at(k) == '#';
      ) {
        B.at(i).at(j) = true;
      }
    }
  }
  for (int i = 0; i < H, i++) {
    for (int j = 0; j < W, j++) {
      if (B.at(i).at(j)) {
        cout << A.at(i).at(j);
      }
      if(j == W-1) {
        cout << endl;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:29: error: expected ';' before ')' token
    9 |   for (int i = 0; i < H, i++) {
      |                             ^
      |                             ;
a.cc:10:31: error: expected ';' before ')' token
   10 |     for (int j = 0; j < W, j++) {
      |                               ^
      |                               ;
a.cc:14:29: error: expected ';' before ')' token
   14 |   for (int i = 0; i < H, i++) {
      |                             ^
      |                             ;
a.cc:15:31: error: expected ';' before ')' token
   15 |     for (int j = 0; j < W, j++) {
      |                               ^
      |                               ;
a.cc:17:9: error: expected primary-expression before 'for'
   17 |         for (int k = 0; k < H, k++) {
      |         ^~~
a.cc:16:11: error: expected ')' before 'for'
   16 |       if (
      |          ~^
      |           )
   17 |         for (int k = 0; k < H, k++) {
      |         ~~~
a.cc:17:25: error: 'k' was not declared in this scope
   17 |         for (int k = 0; k < H, k++) {
      |                         ^
a.cc:20:9: error: expected primary-expression before '||' token
   20 |         ||
      |         ^~
a.cc:21:9: error: expected primary-expression before 'for'
   21 |         for (int k = 0; k < W, k++) {
      |         ^~~
a.cc:28:29: error: expected ';' before ')' token
   28 |   for (int i = 0; i < H, i++) {
      |                             ^
      |                             ;
a.cc:29:31: error: expected ';' before ')' token
   29 |     for (int j = 0; j < W, j++) {
      |                               ^
      |                               ;
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main(){
    int h, w; cin >> h >> w;
    string board[h];
    for(int i=0;i<h;i++){
        cin >> board[i];
    }
    bool goodx[h]=false, goody[w]=false;
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            if(board[i][j] == '#'){
                goodx[i] = true;
                goody[j] = true;
            }
        }
    }
    for(int i=0;i<h;i++){
        if(goodx[i]){
            for(int j=0;j<w;j++){
                if(goody[j]){
                    cout << board[i][j];
                }
            }
            cout << endl;
        }
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: array must be initialized with a brace-enclosed initializer
   10 |     bool goodx[h]=false, goody[w]=false;
      |                   ^~~~~
a.cc:10:35: error: array must be initialized with a brace-enclosed initializer
   10 |     bool goodx[h]=false, goody[w]=false;
      |                                   ^~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(void){
  int H,W;
  cin >> H >> W;
  
  vector<string>grid(H);
  for(int i=0;i<H;i++){
    cin >> grid[i];
  }
  
  int n;
  for(int i=0;i<H;i++){
    n = 0;
    for(int j=0;j<W;j++){
      if(grid[i][j] == '#')
        n = 1;
    }
    if(n == 0){
      for(int j=0;j<W;j++){
        grid[i][j] = '0';
      }
    }
  }
  
  for(int i=0;i<W;i++){
    n = 0;
    for(int j=0;j<H;j++){
      if(grid[j][i] == '#')
        n = 1;
    }
    if(n == 0){
      for(int j = 0;j<H;j++){
        grid[j][i] = '0'
      }
    }
  }
  
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      if(grid[i][j] != '0'){
        cout << grid[i][j];
      }
      
      if(j == W-1)
        cout << endl;
    }
  }
  
  return 0;
}

        

Compiler output:
a.cc: In function 'int main()':
a.cc:36:25: error: expected ';' before '}' token
   36 |         grid[j][i] = '0'
      |                         ^
      |                         ;
   37 |       }
      |       ~
Language: C++

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

void del(vector<vector<char>>&a,vector<int>&b,vector<int>&c){
  int h=a.size();
  int w=a.at(0).size();
  for (int i=0;i<h;i++){
    for(int j=0;j<w;i++){
      if(a.at(i).at(j)=='#'){
        b.at(i)=1;
        continue;
      }
    }
  }
    for (int i=0;i<h;i++){
    for(int j=0;j<w;i++){
      if(a.at(j).at(i)=='#'){
        c.at(i)=1;
        continue;
      }
    }
  }
}

int main(){
  int H,W;
  cin>>H>>W;
  vecrtor<vector<char>>a(H,vector<int>(W));
  vector<int>h(H);
  vector<int>w(W);
  for(int i=0;i<H;i++)for(int j=0;j<W;j++)cin>>a.at(i).at(j);
  del(a,h,w);
  for(int i=0;i<H;i++){
    if(h.at(i)==0)continue;
    for(int j=0;j<W;j++){
      if(w.at(j)==0)continue;
      cout<<a.at(i).at(j);
      if(j==H-1)cout<<endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:3: error: 'vecrtor' was not declared in this scope
   28 |   vecrtor<vector<char>>a(H,vector<int>(W));
      |   ^~~~~~~
a.cc:28:22: error: expected primary-expression before '>' token
   28 |   vecrtor<vector<char>>a(H,vector<int>(W));
      |                      ^~
a.cc:28:24: error: 'a' was not declared in this scope
   28 |   vecrtor<vector<char>>a(H,vector<int>(W));
      |                        ^
Language: C++

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

void del(vector<vector<char>>&a,vector<int>&b,vector<int>&c){
  int h=a.size();
  int w=a.at(0).size();
  for (int i=0;i<h;i++){
    for(int j=0;j<w;i++){
      if(a.at(i).at(j)=='#'){
        b.at(i)=1;
        continue;
      }
    }
  }
    for (int i=0;i<h;i++){
    for(int j=0;j<w;i++){
      if(a.at(j).at(i)=='#'){
        c.at(i)=1;
        continue;
      }
    }
  }
}

int main(){
  int H,W;
  cin>>h>>w;
  vecrtor<vector<char>>a(H,vector<int>(W));
  vector<int>h(H);
  vector<int>w(W);
  for(int i=0;i<H;i++)for(int j=0;j<W;j++)cin>>a.at(i).at(j);
  del(a,h,w);
  for(int i=0;i<H;i++){
    if(h.at(i)==0)continue;
    for(int j=0;j<W;j++){
      if(w.at(j)==0)continue;
      cout<<a.at(i).at(j);
      if(j==H-1)cout<<endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:8: error: 'h' was not declared in this scope
   27 |   cin>>h>>w;
      |        ^
a.cc:27:11: error: 'w' was not declared in this scope
   27 |   cin>>h>>w;
      |           ^
a.cc:28:3: error: 'vecrtor' was not declared in this scope
   28 |   vecrtor<vector<char>>a(H,vector<int>(W));
      |   ^~~~~~~
a.cc:28:22: error: expected primary-expression before '>' token
   28 |   vecrtor<vector<char>>a(H,vector<int>(W));
      |                      ^~
a.cc:28:24: error: 'a' was not declared in this scope
   28 |   vecrtor<vector<char>>a(H,vector<int>(W));
      |                        ^
Language: C++

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

void del(vector<vector<char>>&a,vector<int>&b,vector<int>&c){
  int h=a.size();
  int w=a.at(0).size();
  for (int i=0;i<h;i++){
    for(int j=0;j<w;i++){
      if(a.at(i).at(j)=='#'){
        b.at(i)=1;
        continue;
      }
    }
  }
    for (int i=0;i<h;i++){
    for(int j=0;j<w;i++){
      if(a.at(j).at(i)=='#'){
        c.at(i)=1;
        continue;
      }
    }
  }
}

int main{
  int H,W;
  cin>>h>>w;
  vecrtor<vector<char>>a(H,vector<int>(W));
  vector<int>h(H);
  vector<int>w(W);
  for(int i=0;i<H;i++)for(int j=0;j<W;j++)cin>>a.at(i).at(j);
  del(a,h,w);
  for(int i=0;i<H;i++){
    if(h.at(i)==0)continue;
    for(int j=0;j<W;j++){
      if(w.at(j)==0)continue;
      cout<<a.at(i).at(j);
      if(j==H-1)cout<<endl;
    }
  }
}

Compiler output:
a.cc:25:5: error: cannot declare '::main' to be a global variable
   25 | int main{
      |     ^~~~
a.cc:26:3: error: expected primary-expression before 'int'
   26 |   int H,W;
      |   ^~~
a.cc:26:3: error: expected '}' before 'int'
a.cc:25:9: note: to match this '{'
   25 | int main{
      |         ^
a.cc:27:3: error: 'cin' does not name a type
   27 |   cin>>h>>w;
      |   ^~~
a.cc:28:3: error: 'vecrtor' does not name a type
   28 |   vecrtor<vector<char>>a(H,vector<int>(W));
      |   ^~~~~~~
a.cc:29:16: error: 'H' was not declared in this scope
   29 |   vector<int>h(H);
      |                ^
a.cc:30:16: error: 'W' was not declared in this scope
   30 |   vector<int>w(W);
      |                ^
a.cc:31:3: error: expected unqualified-id before 'for'
   31 |   for(int i=0;i<H;i++)for(int j=0;j<W;j++)cin>>a.at(i).at(j);
      |   ^~~
a.cc:31:15: error: 'i' does not name a type
   31 |   for(int i=0;i<H;i++)for(int j=0;j<W;j++)cin>>a.at(i).at(j);
      |               ^
a.cc:31:19: error: 'i' does not name a type
   31 |   for(int i=0;i<H;i++)for(int j=0;j<W;j++)cin>>a.at(i).at(j);
      |                   ^
a.cc:31:35: error: 'j' does not name a type
   31 |   for(int i=0;i<H;i++)for(int j=0;j<W;j++)cin>>a.at(i).at(j);
      |                                   ^
a.cc:31:39: error: 'j' does not name a type
   31 |   for(int i=0;i<H;i++)for(int j=0;j<W;j++)cin>>a.at(i).at(j);
      |                                       ^
a.cc:32:6: error: expected constructor, destructor, or type conversion before '(' token
   32 |   del(a,h,w);
      |      ^
a.cc:33:3: error: expected unqualified-id before 'for'
   33 |   for(int i=0;i<H;i++){
      |   ^~~
a.cc:33:15: error: 'i' does not name a type
   33 |   for(int i=0;i<H;i++){
      |               ^
a.cc:33:19: error: 'i' does not name a type
   33 |   for(int i=0;i<H;i++){
      |                   ^
a.cc:41:1: error: expected declaration before '}' token
   41 | }
      | ^
Language: C

#include <bits/stdc++.h>

using namespace std;

int main(){
    int a,b;
    char c[105][105];
    set<int> x,y;
    cin>>a>>b;
    set<int>::iterator ax;
    set<int>::iterator by;
    for(int i=0;i<a;i++){
        scanf("%s",c[i]);
    }
    for(int i=0;i<a;i++){
        for(int j=0;j<b;j++){
            if(c[i][j]=='#')
            {
                x.insert(i);
                y.insert(j);
            }
        }
    }

    for(ax=x.begin();ax!=x.end();ax++)
    {
        for(by=y.begin();by!=y.end();by++)
        {
            cout<<c[*ax][*by];
        }
        cout<<endl;
    }
    return 0;
}


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

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

int main(){
  int H,W;
  cin>>H>>W;
  vector<vector<char>> table(H,vector<char>(W));
  vector<bool> row(H,false);
  vector<bool> col(W,false);
  for (int i=0;i<H;i++){
    for (int j=0;j<W;j++){
      cin>>table.at(i).at(j);
      if (table.at(i).at(j)=='#'){
        row.at(i)=true;
        col.at(j)=true;
      }
    }
  }
  for(int i=0;i<H;i++){
    if (row.at(i){
      for (int j=0;j<W;j++){
        if (col.at(j)){
          cout<<table.at(i).at(j);
        }
        if (j==W-1){
          cout<<endl;
        }
      }
    }
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: expected ')' before '{' token
   20 |     if (row.at(i){
      |        ~         ^
      |                  )
a.cc:30:9: error: expected primary-expression before '}' token
   30 |         }
      |         ^
a.cc:30:10: error: expected '}' at end of input
   30 |         }
      |          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
  int h,w;
  cin>>h>>w;
  vector<string> board(h);
  for(int i=0;i<h;i++){
    cin>>board[i];
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:4: error: expected '}' at end of input
   11 |   }
      |    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C

#include <stdio.h>
#include<stdbool.h>
int main(){
    int H,W;scanf("%d%d",&H,&W);
    char a[H][W];
    bool black_column[H]={false};
    bool black_row[W]={false};
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            scanf("%s" ,&a[i][j]);
            black_column[i]|=(a[i][j]='#');
            black_row[j]|=(a[i][j]='#');
        }
    }
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            if(black_column[i]&&black_row[j])printf("%s",a[i][j]);
            if(black_column[i])printf("\n");
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:26: error: variable-sized object may not be initialized except with an empty initializer
    6 |     bool black_column[H]={false};
      |                          ^
main.c:7:23: error: variable-sized object may not be initialized except with an empty initializer
    7 |     bool black_row[W]={false};
      |                       ^
Language: C

#include <stdio.h>
int main(){
    int H,W;scanf("%d%d",&H,&W);
    char a[H][W];
    bool black_column[H]={false};
    bool black_row[W]={false};
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            scanf("%s" ,&a[i][j]);
            black_column[i]|=(a[i][j]='#');
            black_row[j]|=(a[i][j]='#');
        }
    }
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            if(black_column[i]&&black_row[j])printf("%s",a[i][j]);
            if(black_column[i])printf("\n");
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:5: error: unknown type name 'bool'
    5 |     bool black_column[H]={false};
      |     ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | int main(){
main.c:5:26: error: variable-sized object may not be initialized except with an empty initializer
    5 |     bool black_column[H]={false};
      |                          ^
main.c:5:27: error: 'false' undeclared (first use in this function)
    5 |     bool black_column[H]={false};
      |                           ^~~~~
main.c:5:27: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:5:27: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:5: error: unknown type name 'bool'
    6 |     bool black_row[W]={false};
      |     ^~~~
main.c:6:5: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:6:23: error: variable-sized object may not be initialized except with an empty initializer
    6 |     bool black_row[W]={false};
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int h,w;
  int data[h][w];
  cin >> h >> w;
  int count=0;
  for (int i=0;i<h;i++){
    for (int j=0;j<w;j++){
      cin >> data[i][j];
    }
  }
  //i行目の調査
  for (int i=0;i<h;i++){
    count=0;
    for (int j=0;j<w;j++){
      if (data[i][j] == ".") count++;
    }
    //i行目を調査して全部空白ならその行をxにする
    if (count == w){
      for (int k=0;k<w;k++){
        data[i][k] = "x";
      }
    }
  }
  //j列目の調査
  for (int j=0;j<w;j++){
    count=0;
    for (int i=0;i<h;i++){
      if (data[i][j] == "." || data[i][j] == "x") count++;
    }
    //j列目を調査して全部空白ならその行をxにする
    if (count == h){
      for (int k=0;k<h;k++){
        data[k][j] = "x";
      }
    }
  }
  for (int i=0;i<h;i++){
    for (int j=0;j<w;j++){
      if (data[i][j] != "x") cout << data[i][j]; 
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       if (data[i][j] == ".") count++;
      |           ~~~~~~~~~~~^~~~~~
a.cc:23:22: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   23 |         data[i][k] = "x";
      |                      ^~~
      |                      |
      |                      const char*
a.cc:31:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |       if (data[i][j] == "." || data[i][j] == "x") count++;
      |           ~~~~~~~~~~~^~~~~~
a.cc:31:43: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |       if (data[i][j] == "." || data[i][j] == "x") count++;
      |                                ~~~~~~~~~~~^~~~~~
a.cc:36:22: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   36 |         data[k][j] = "x";
      |                      ^~~
      |                      |
      |                      const char*
a.cc:42:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   42 |       if (data[i][j] != "x") cout << data[i][j];
      |           ~~~~~~~~~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int h,w;
  data[h][w];
  sub_data[h][w];
  cin >> h >> w;
  int count=0;
  for (int i=0;i<h;i++){
    for (int j=0;j<w;j++){
      cin >> data[i][j];
    }
  }
  //i行目の調査
  for (int i=0;i<h;i++){
    count=0;
    for (int j=0;j<w;j++){
      if (data[i][j] == ".") count++;
    }
    //i行目を調査して全部空白ならその行をxにする
    if (count == w){
      for (int k=0;k<w;k++){
        data[i][k] = "x";
      }
    }
  }
  //j列目の調査
  for (int j=0;j<w;j++){
    count=0;
    for (int i=0;i<h;i++){
      if (data[i][j] == "." || data[i][j] == "x") count++;
    }
    //j列目を調査して全部空白ならその行をxにする
    if (count == h){
      for (int k=0;k<h;k++){
        data[k][j] = "x";
      }
    }
  }
  for (int i=0;i<h;i++){
    for (int j=0;j<w;j++){
      if (data[i][j] != "x") cout << data[i][j]; 
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
    6 |   data[h][w];
      |       ^
a.cc:7:3: error: 'sub_data' was not declared in this scope
    7 |   sub_data[h][w];
      |   ^~~~~~~~
a.cc:12:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   12 |       cin >> data[i][j];
      |                  ^
a.cc:19:15: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   19 |       if (data[i][j] == ".") count++;
      |               ^
a.cc:24:13: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   24 |         data[i][k] = "x";
      |             ^
a.cc:32:15: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   32 |       if (data[i][j] == "." || data[i][j] == "x") count++;
      |               ^
a.cc:32:36: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   32 |       if (data[i][j] == "." || data[i][j] == "x") count++;
      |                                    ^
a.cc:37:13: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   37 |         data[k][j] = "x";
      |             ^
a.cc:43:15: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   43 |       if (data[i][j] != "x") cout << data[i][j];
      |               ^
a.cc:43:42: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   43 |       if (data[i][j] != "x") cout << data[i][j];
      |                                          ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int H,W;
  int counth=0;
  int countw=0;
  cin>>H>>W;
  char HW[H][W];
  for(int i=0; i<H; ++i){
    for(int j=0; j<W; ++j){
      cin>>HW[i][j];
    }
  }
  for(int i=0; i<H; ++i){
    bool can=true;
    for(int j=0; j<W; ++j){
      if(HW[i][j]==".") can=false;
    }
    if(can) counth += 1;
  }
  for(int i=0; i<W; ++i){
    bool can=true;
    for(int j=0; j<H; ++j){
      if(HW[j][i]==".") can=false;
    }
    if(can) countw += 1;
  }
  cout<<(H-counth)*(W-countw)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       if(HW[i][j]==".") can=false;
      |          ~~~~~~~~^~~~~
a.cc:25:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |       if(HW[j][i]==".") can=false;
      |          ~~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;

int main() {
  int h,w; cin>>h>>w;
  char grid[h][w];
  rep(i, h){
    rep(j, w){
      cin>>grid[i][j];
    }
  }
  
  
  rep(i, h){
    bool siro1=true;
    rep(j, w){
      if(grid[i][j]!='.'){siro1=false;
                          break;}
    }
      if(siro1){
          rep(j, w){grid[i][j]=$;}
      }
  }
        
  
  
   rep(j, w){
    bool siro1=true;
    rep(i, h){
      if(grid[i][j]!='.'){siro1=false;
                          break;}
    }
      if(siro1){
          rep(i, h){grid[i][j]=0;}
      }
  }
  
  rep(i, h){
    rep(j, w){
      if(grid[i][j]!='0')cout<<grid[i][j];
      if(j==w-1)cout<<endl;
    }
  }
  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:32: error: '$' was not declared in this scope
   24 |           rep(j, w){grid[i][j]=$;}
      |                                ^
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;

int main() {
  int h,w; cin>>h>>w;
  char grid[h][w];
  rep(i, h){
    rep(i, w){
      cin>>grid[i][j];
    }
  }
  
  
  rep(i, h){
    bool siro1=true;
    rep(j, w){
      if(grid[i][j]!='.'){siro1=false;
                          break;}
    }
      if(siro1){
          rep(j, w){grid[i][j]=$;}
      }
  }
        
  
  
   rep(j, w){
    bool siro1=true;
    rep(i, h){
      if(grid[i][j]!='.'){siro1=false;
                          break;}
    }
      if(siro1){
          rep(i, h){grid[i][j]=$;}
      }
  }
  
  rep(i, h){
    rep(j, w){
      if(grid[i][j]!='$')cout<<grid[i][j];
      if(j==w-1)cout<<endl;
    }
  }
  

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: 'j' was not declared in this scope
   12 |       cin>>grid[i][j];
      |                    ^
a.cc:24:32: error: '$' was not declared in this scope
   24 |           rep(j, w){grid[i][j]=$;}
      |                                ^
a.cc:37:32: error: '$' was not declared in this scope
   37 |           rep(i, h){grid[i][j]=$;}
      |                                ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define cinf(n,x) for(int i=0;i<(n);i++) cin >> x[i];

int main(){
  int H,W ;
  cin >> H >> W ;
  vector<string> a(h) ;
  cinf(H,a) ;
  
  vector<bool> row(H,false) ;
  vector<bool> col(W,false) ;
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      if(a[i][j] == '#'){
        row[i] = true ;
        col[j] = true ;
      }
    }
  }
  for(int i=0;i<H;i++){
    if(row[i]){
      for(int j=0;j<W;j++){
        if(col[j])
          cout<<a[i][j] ;
      }
      cout << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 'h' was not declared in this scope
    9 |   vector<string> a(h) ;
      |                    ^