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

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

void del_blank_column(vector<string> &board, int H, int W) {
  vector<bool> check(W, false);
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (board.at(j).at(i) == '#') break;
      check.at(i) = true;
    }
  }
  for (int i = W - 1; i >= 0; i--) {
    if (check.at(i)) {
      for (int j = 0; j < H; j++) {
        board.at(j).erase(i,1)
      }
    }
  }
}

int main() {
  int H, W;
  cin >> H >> W;
  vector<string> board(H);
  string blank = "";
  for (int i = 0; i < H; i++) blank += ".";
  for (int i = 0; i < H; i++) {
    cin >> board.at(i);
    if (board.at(i) == blank) board.pop_back();
  }
  del_blank_column(board, board.size(), W);
  for (int i = 0; i < board.size(); i++) cout << board.at(i) << endl;
}
  


Compiler output:
a.cc: In function 'void del_blank_column(std::vector<std::__cxx11::basic_string<char> >&, int, int)':
a.cc:15:31: error: expected ';' before '}' token
   15 |         board.at(j).erase(i,1)
      |                               ^
      |                               ;
   16 |       }
      |       ~
Language: C++

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

void del_blank_column(vector<string> &board, int H, int W) {
  vector<bool> check(W, false);
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (board.at(j).at(i) == '#') break;
      check.at(i) = true;
    }
  }
  for (int i = W - 1; i >= 0; i--) {
    if (check.at(i)) {
      for (int j = 0; j < H; j++) {
        board.at(j).at(i) = '';
      }
    }
  }
}

int main() {
  int H, W;
  cin >> H >> W;
  vector<string> board(H);
  string blank = "";
  for (int i = 0; i < H; i++) blank += ".";
  for (int i = 0; i < H; i++) {
    cin >> board.at(i);
    if (board.at(i) == blank) board.pop_back();
  }
  del_blank_column(board, board.size(), W);
  for (int i = 0; i < board.size(); i++) cout << board.at(i) << endl;
}
  


Compiler output:
a.cc:15:29: error: empty character constant
   15 |         board.at(j).at(i) = '';
      |                             ^~
Language: C++

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

void del_blank_column(vector<string> &board, int H, int W) {
  vector<bool> check(W, false);
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (board.at(j).at(i) == '#') break;
      check.at(i) = true;
    }
  }
  for (int i = W - 1; i >= 0; i--) {
    if (check.at(i)) {
      for (int j = 0; j < H; j++) {
        board.at(j).at(i) = "";
      }
    }
  }
}

int main() {
  int H, W;
  cin >> H >> W;
  vector<string> board(H);
  string blank = "";
  for (int i = 0; i < H; i++) blank += ".";
  for (int i = 0; i < H; i++) {
    cin >> board.at(i);
    if (board.at(i) == blank) board.pop_back();
  }
  del_blank_column(board, board.size(), W);
  for (int i = 0; i < board.size(); i++) cout << board.at(i) << endl;
}
  

Compiler output:
a.cc: In function 'void del_blank_column(std::vector<std::__cxx11::basic_string<char> >&, int, int)':
a.cc:15:29: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   15 |         board.at(j).at(i) = "";
      |                             ^~
      |                             |
      |                             const char*
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:8:13: note: to match this '{'
    8 |  int main() {
      |             ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:34:3: error: expected '}' at end of input
   34 |  }
      |   ^
a.cc:8:13: note: to match this '{'
    8 |  int main() {
      |             ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:33:3: error: expected '}' at end of input
   33 |  }
      |   ^
a.cc:8:13: note: to match this '{'
    8 |  int main() {
      |             ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:32:3: error: expected '}' at end of input
   32 |  }
      |   ^
a.cc:8:13: note: to match this '{'
    8 |  int main() {
      |             ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:31:5: error: expected '}' at end of input
   31 |    }
      |     ^
a.cc:15:30: note: to match this '{'
   15 |    for (int i = 0;i < X;i++) {
      |                              ^
a.cc:31:5: error: expected '}' at end of input
   31 |    }
      |     ^
a.cc:8:13: note: to match this '{'
    8 |  int main() {
      |             ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    9 |  int main() {
      |          ^~
a.cc:9:10: note: remove parentheses to default-initialize a variable
    9 |  int main() {
      |          ^~
      |          --
a.cc:9:10: note: or replace parentheses with braces to value-initialize a variable
a.cc:9:13: error: a function-definition is not allowed here before '{' token
    9 |  int main() {
      |             ^
a.cc:32:5: error: expected '}' at end of input
   32 |    }
      |     ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define int long long // at least int64 > 9*10^18
#define ENDL '\n'
#define rep(i,n) for(int i = 0; i < (n); i++)
#define print(i) std::cout << (i) << '\n'
#define all(v) (v).begin(), (v).end()

using namespace std;

signed main (){
  int H,W;
  cin>>H>>N;
  vector<string> a(H);
  rep(i,H){
    cin>>a[i];
  }
  vector<bool> row(H, false);
  vector<bool> col(W, false);
  rep(i,H){
    rep(j,W){
      if(a[i][j]=='#'){
        row[i]=true;
        col[j]=true;
      }
    }
  }
  rep(i,H){
    if(row[i]){
      rep(j,W){
        if(col[j]){
          cout<<a[i][j] ;
        }
      }
      cout<<endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'N' was not declared in this scope
   12 |   cin>>H>>N;
      |           ^
Language: C++

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

int main(){
  int H,W;
  cin >>H>>W;
  char a[H][W];
  bool letu[W];
  bool gyou[H];
  for (int i=0;i<W;i++){
    letu[i]=0;
  }
  for (int i=0;i<H;i++){
    gyou[i]=0;
  }
  
  for (int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      cin>>a[i][j];
      if (a[i][j]=='#'){
        letu[j]=1;
        gyou[i]=1;
      }
    }
  }
  
  for (int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      if((letu[j]==1)&&(gyou[i]==1)){
        cout<<a[i][j];
      
    if (gyou[i]==1){
      cout<<endl;
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:2: error: expected '}' at end of input
   37 | }
      |  ^
a.cc:27:24: note: to match this '{'
   27 |   for (int i=0;i<H;i++){
      |                        ^
a.cc:37:2: error: expected '}' at end of input
   37 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

bool is_allwhite(string str)
{
  bool check = true;
  for(int i = 0; i < str.size(); i++)
  {
    if(str.at(i) == '#')
    {
      check = false;
      break;
    }
  }
  return check;
}

int main()
{
  int H, W;
  cin >> H >> W;
  vector<string> vec(0);
  string tmp;
  for(int i = 0; i < H; i++)
  {
    cin >> tmp;
    vec.push_back(tmp);
    if(is_allwhite(vec.at(i)))
      vec.pop_back;
  }
  H = vec.size();
  vector<int> del(0);
  for(int j = 0; j < W; j++)
  {
    bool all_white = false;
    for(int i = 0; i < H; i++)
    {
      if(vec.at(i).at(j) == '#')
      	break;
      else if(i == H - 1)
        all_white = true;
    }
    if(all_white)
      del.push_back(j);
  }
  while(del.size())
  {
    int j = del.size() - 1;
    for(int i = 0; i < H; i++)
      vec.at(i).erase(j, 1);
    del.pop_back;
  }
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cout << vec.at(i).at(j);
    cout << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:11: error: invalid use of non-static member function 'void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
   30 |       vec.pop_back;
      |       ~~~~^~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1324:7: note: declared here
 1324 |       pop_back() _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
a.cc:52:9: error: invalid use of non-static member function 'void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = int; _Alloc = std::allocator<int>]'
   52 |     del.pop_back;
      |     ~~~~^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1324:7: note: declared here
 1324 |       pop_back() _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
Language: C++

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

bool is_allwhite(string str)
{
  bool check = true;
  for(int i = 0; i < str.size(); i++)
  {
    if(str.at(i) == '#')
    {
      check = false;
      break;
    }
  }
  return check;
}

int main()
{
  int H, W;
  cin >> H >> W;
  vector<string> vec(0);
  string tmp;
  for(int i = 0; i < H; i++)
  {
    cin >> tmp;
    vec.push_back(tmp);
    if(is_allwhite(vec.at(i)))
      vec.pop_back;
  }
  H = vec.size();
  vector<int> del(0);
  for(int j = 0; j < W; j++)
  {
    bool all_white = false;
    for(int i = 0; i < H; i++)
    {
      if(vec.at(i).at(j) == '#')
      	break;
      else if(i == H - 1)
        all_white = true;
    }
    if(all_white)
      del.push_back(j);
  }
  while(del.size())
  {
    int j = del.size() - 1;
    for(int i = 0; i < H; i++)
      vec.at(i).erase(j, 1);
    del.pop_back;
  }
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cout << vec.at(i).at(j);
    cout << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:11: error: invalid use of non-static member function 'void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
   29 |       vec.pop_back;
      |       ~~~~^~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1324:7: note: declared here
 1324 |       pop_back() _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
a.cc:51:9: error: invalid use of non-static member function 'void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = int; _Alloc = std::allocator<int>]'
   51 |     del.pop_back;
      |     ~~~~^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1324:7: note: declared here
 1324 |       pop_back() _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
Language: C++

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

bool is_allwhite(string str)
{
  bool check = true;
  for(int i = 0; i < str.size(); i++)
  {
    if(str.at(i) == '#')
    {
      check = false;
      break;
    }
  }
  return check;
}

int main()
{
  int H, W;
  cin >> H >> W;
  vector<string> vec(0);
  string tmp;
  for(int i = 0; i < H; i++)
  {
    cin >> tmp;
    vec.push_back(tmp);
    if(is_allwhite(vec.at(i)))
      vec.pop_back;
  }
  H = vec.size();
  vector<int> del(0);
  for(int j = 0; j < W; j++)
  {
    bool all_white = false;
    for(int i = 0; i < H; i++)
    {
      if(vec.at(i).at(j) == '#')
      	break;
      else if(i == H - 1)
        all_white = true;
    }
    if(all_white)
      del.push_back(j)
  }
  while(del.size())
  {
    int j = del.size() - 1;
    for(int i = 0; i < H; i++)
      vec.at(i).erase(j, 1);
    del.pop_back;
  }
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cout << vec.at(i).at(j);
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:11: error: invalid use of non-static member function 'void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
   29 |       vec.pop_back;
      |       ~~~~^~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1324:7: note: declared here
 1324 |       pop_back() _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
a.cc:44:23: error: expected ';' before '}' token
   44 |       del.push_back(j)
      |                       ^
      |                       ;
   45 |   }
      |   ~                    
a.cc:51:9: error: invalid use of non-static member function 'void std::vector<_Tp, _Alloc>::pop_back() [with _Tp = int; _Alloc = std::allocator<int>]'
   51 |     del.pop_back;
      |     ~~~~^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1324:7: note: declared here
 1324 |       pop_back() _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
Language: C++

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

int main()
{
  int H, W;
  cin >> H >> W;
  vector<string> vec(H);
  for(int i = 0; i < H; i++)
  {
    cin >> vec.at(i);
    for(int j = 0; j < W; j++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(j == W - 1)
        vec.pop_back();
    }
  }
  vector<int> elase(0);
  for(int i = 0; i < W; i++)
  {
    for(int j = 0; j < H; j++)
    {
      if(vec.at(j).at(i) == '#')
        break;
      else if(j == H - 1)
        elase.push_back(i);
    }
  }
  for(int i = 0; i < H - elase.size(); i++)
  {
    int itr = 0;
    for(int j = 0; j < W; j++)
    {
      if(j == elase.at(itr))
      {
        itr++;
        continue;
      }
      else
        cout << vec.at(i).at(j);
      
    }
    cout << endl;
}


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

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

int main()
{
  int H, W;
  cin >> H >> W;
  vector<string> vec(H);
  for(int i = 0; i < H; i++)
  {
    cin >> vec.at(i);
    for(int j = 0; j < W; j++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(j == W - 1)
        vec.pop_back();
    }
  }
  vector<int> elase(0);
  for(int i = 0; i < W; i++)
  {
    for(int j = 0; j < H; j++)
    {
      if(vec.at(j).at(i) == '#')
        break;
      else if(j == H - 1)
        elase.push_back(i);
    }
  }
  for(int i = 0; i < H; i++)
  {
    int itr = 0;
    for(int j = 0; j < W; j++)
    {
      if(j == elase.at(itr))
      {
        itr++;
        continue;
      }
      else
        cout << vec.at(i).at(j);
      
    }
    cout << endl;
}

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

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

int main()
{
  int H, W;
  cin >> H >> W;
  vector<vector<char>> vec(H, vector<char>(W));
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cin >> vec.at(i).at(j);
  }
  vector<int> xelase(0);
  vector<int> yelase(0);
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(j == W - 1)
        yelase.push_back(i);
    }
  }
  for(int j = 0; j < W; j++)
  {
    for(int i = 0; i < H; i++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(i == H - 1)
        xelase.push_back(i);
    }
  }
  vector<vector<char>> res(0, vector<char>(0));
  int xitr = 0, yitr = 0, resitr = 0;
  for(int i = 0; i < H; i++)
  {
    xitr = 0;
                  
    if(i == yelase.at(yitr))
    {
      yitr++;
      continue;
    }
    res.push_back(vector<char>(0));
    for(int j = 0; j < W; j++)
    {
      if(j == xelase.at(xitr))
      {
        xitr++;
        continue;
      }
      else
      {
        res.at(resitr).push_back(vec.at(i).at(j));
        resitr++;
      }
    }
  }
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cout << res.at(i).at(j);
    cout << endl;
  }
        
}


Compiler output:
a.cc: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>> vec(H, vector<char>(W));
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cin >> vec.at(i).at(j);
  }
  vector<int> xelase(0);
  vector<int> yelase(0);
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(j == W - 1)
        yelase.push_back(i);
    }
  }
  for(int j = 0; j < W; j++)
  {
    for(int i = 0; i < H; i++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(i == H - 1)
        xelase.push_back(i);
    }
  }
  
  vector<vector<char>> res(0, vector<char>(0));
  int xitr = 0, yitr = 0;
  for(int i = 0; i < H; i++)
  {
    xitr = 0;
                  
    if(i == yelase.at(yitr))
    {
      yitr++;
      continue;
    }
    res.push_back(vector<char>(0));
    for(int j = 0; j < W; j++)
    {
      if(j == xelase.at(xitr))
      {
        xitr++;
        continue;
      }
      else
        res.at(res.end()).push_back(vec.at(i).at(j));
    }
  }
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cout << res.at(i).at(j);
    cout << endl;
  }
        
}


Compiler output:
a.cc: In function 'int main()':
a.cc:57:15: error: no matching function for call to 'std::vector<std::vector<char> >::at(std::vector<std::vector<char> >::iterator)'
   57 |         res.at(res.end()).push_back(vec.at(i).at(j));
      |         ~~~~~~^~~~~~~~~~~
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:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; reference = std::vector<char>&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:20: note:   no known conversion for argument 1 from 'std::vector<std::vector<char> >::iterator' to 'std::vector<std::vector<char> >::size_type' {aka 'long unsigned int'}
 1180 |       at(size_type __n)
      |          ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; const_reference = const std::vector<char>&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:20: note:   no known conversion for argument 1 from 'std::vector<std::vector<char> >::iterator' to 'std::vector<std::vector<char> >::size_type' {aka 'long unsigned int'}
 1199 |       at(size_type __n) const
      |          ~~~~~~~~~~^~~
Language: C++

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

int main()
{
  int H, W;
  cin >> H >> W;
  vector<vector<char>> vec(H, vector<char>(W));
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cin >> vec.at(i).at(j);
  }
  vector<int> xelase(0);
  vector<int> yelase(0);
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(j == W - 1)
        yelase.push_back(i);
    }
  }
  for(int j = 0; j < W; j++)
  {
    for(int i = 0; i < H; i++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(i == H - 1)
        xelase.push_back(i);
    }
  }
  
  vector<vector<char>> res(0, vector<char>(0));
  int xitr = 0, yitr = 0;
  for(int i = 0; i < H; i++)
  {
    xitr = 0;
                  
    if(i == yelase.at(yitr))
    {
      yitr++;
      continue;
    }
    res.push_back(vector<char>(0));
    for(int j = 0; j < W; j++)
    {
      if(j == xelase.at(xitr))
      {
        xitr++;
        continue;
      }
      else
        res.at(res.end()).push_back(vec.at(i).at(j));
    }
  }
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cout << res.at(i).at(j);
    cout << endl;
  }
        
}


Compiler output:
a.cc: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>> vec(H, vector<char>(W));
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cin >> vec.at(i).at(j);
  }
  vector<int> xelase(0);
  vector<int> yelase(0);
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(j == W - 1)
        yelase.push_back(i);
    }
  }
  for(int j = 0; j < W; j++)
  {
    for(int i = 0; i < H; i++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(i == H - 1)
        xelase.push_back(i);
    }
  }
  
  vector<vector<char>> res(0, vector<char>);
  int xitr = 0, yitr = 0;
  for(int i = 0; i < H; i++)
  {
    xitr = 0;
                  
    if(i == yelase.at(yitr))
    {
      yitr++;
      continue;
    }
    res.push_back(vector<char>(0));
    for(int j = 0; j < W; j++)
    {
      if(j == xelase.at(xitr))
      {
        xitr++;
        continue;
      }
      else
        res.at(res.end()).push_back(vec.at(i).at(j));
    }
  }
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cout << res.at(i).at(j);
    cout << endl;
  }
        
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:43: error: expected primary-expression before ')' token
   37 |   vector<vector<char>> res(0, vector<char>);
      |                                           ^
a.cc:57:15: error: no matching function for call to 'std::vector<std::vector<char> >::at(std::vector<std::vector<char> >::iterator)'
   57 |         res.at(res.end()).push_back(vec.at(i).at(j));
      |         ~~~~~~^~~~~~~~~~~
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:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; reference = std::vector<char>&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:20: note:   no known conversion for argument 1 from 'std::vector<std::vector<char> >::iterator' to 'std::vector<std::vector<char> >::size_type' {aka 'long unsigned int'}
 1180 |       at(size_type __n)
      |          ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; const_reference = const std::vector<char>&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:20: note:   no known conversion for argument 1 from 'std::vector<std::vector<char> >::iterator' to 'std::vector<std::vector<char> >::size_type' {aka 'long unsigned int'}
 1199 |       at(size_type __n) const
      |          ~~~~~~~~~~^~~
Language: C++

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

int main()
{
  int H, W;
  cin >> H >> W;
  vector<vector<char>> vec(H, vector<char>(W));
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cin >> vec.at(i).at(j);
  }
  vector<int> xelase(0);
  vector<int> yelase(0);
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(j == W - 1)
        yelase.push_back(i);
    }
  }
  for(int j = 0; j < W; j++)
  {
    for(int i = 0; i < H; i++)
    {
      if(vec.at(i).at(j) == '#')
        break;
      else if(i == H - 1)
        xelase.push_back(i);
    }
  }
  
  vector<vector<char>> res(0, vector<char>);
  int xitr = 0, yitr = 0;
  for(int i = 0; i < H; i++)
  {
    xitr = 0;
                  
    if(i == yelase.at(yitr))
    {
      yitr++;
      continue;
    }
    res.push_back(vector<char>(0));
    for(int j = 0; j < W; j++)
    {
      if(j == xelase.at(xitr))
      {
        xitr++;
        continue;
      }
      else
        res.at(res.end()).push_back(vec.at(i).at(j));
    }
  }
  for(int i = 0; i < H; i++)
  {
    for(int j = 0; j < W; j++)
      cout << res.at(i).at(j);
    cout << endl;
  }
        
}

Compiler output:
a.cc: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<string> a(H);
    for (int i=0;i<H;i++) {
        cin >> a.at(i);
    }

    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.at(i).at(j)=="#") {
                row.at(i)=true;
                col.at(i)=true;
            }
        }
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |             if (a.at(i).at(j)=="#") {
      |                 ~~~~~~~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
main() {
  int H,W,i,j;
  cin>>H>>W;
  vector<vector<char>>S(H,vector<char>(W));
  for(i=0;i<H;i++)for(j=0;j<W;j++)cin>>S.at(i).at(j);
  for(i=0;i<H;i++){
    for(j=0;j<W;j++)if(S.at(i).at(j)=='#')break;
    if(j==W)for(j=0;j<W;j++)S.at(i).at(j)='-';
  }
  for(i=0;i<W;i++){
    for(j=0;j<H;j++)if(S.at(j).at(i)=='#')break;
    if(j==H)for(j=0;j<H;j++)S.at(j).at(i)='-';
  }
  for(i=0;i<H;i++){
    for(j=0;j<W;j++){
      if(S.at(i).at(j)!='-'){
        cout<<S.at(i).at(j);
      }
    }
    for(j=0;j<W;j++)if(S.at(i).at(j)=='#')break;
    if(j!=W)cout<<endl
  }
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:23:23: error: expected ';' before '}' token
   23 |     if(j!=W)cout<<endl
      |                       ^
      |                       ;
   24 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
main() {
  int H,W,i,j;
  cin>>H>>W;
  vector<vector<char>>S(H,vector<char>(W));
  for(i=0;i<H;i++)for(j=0;j<W;j++)cin>>S.at(i).at(j);
  for(i=0;i<H;i++){
    for(j=0;j<W;j++)if(S.at(i).at(j)=='#')break;
    if(j==)for(j=0;j<W;j++)S.at(i).at(j)='-';
  }
  for(i=0;i<W;i++){
    for(j=0;j<H;j++)if(S.at(j).at(i)=='#')break;
    if(j==H)for(j=0;j<H;j++)S.at(j).at(i)='-';
  }
  for(i=0;i<H;i++){
    for(j=0;j<W;j++){
      if(S.at(i).at(j)!='-'){
        cout<<S.at(i).at(j);
        if(j==W-1)cout<<endl;
      }
    }
  }
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:11: error: expected primary-expression before ')' token
   10 |     if(j==)for(j=0;j<W;j++)S.at(i).at(j)='-';
      |           ^
Language: C++

include <bits/stdc++.h>
using namespace std;
int main() {
  int h,w;
  cin >> h >> w;
  vector<bool> x(w,false);
  vector<bool> y(h,false);
  vector<vector <char>> board(h,vector<char>(w));
  for (int i=0; i<h; i++) {
    for (int j=0; j<w; j++) {
      cin >> board.at(i).at(j);
    }
  }
  for (int i=0; i<h; i++) {
    for (int j=0; j<w; j++) {
      if (board.at(i).at(j) == '#') {
        y[i] = true;
        x[j] = true;
      }
    }
  }
  for (int i=0; i<h; i++) {
    if (y[i] == true) {
      for (int j=0; j<w; j++) {
        if (x[j] == true) {
          cout << board.at(i).at(j);
        }
      }
      cout << endl;
    }
  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> h >> w;
      |   ^~~
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<bool> x(w,false);
      |   ^~~~~~
a.cc:6:10: error: expected primary-expression before 'bool'
    6 |   vector<bool> x(w,false);
      |          ^~~~
a.cc:7:10: error: expected primary-expression before 'bool'
    7 |   vector<bool> y(h,false);
      |          ^~~~
a.cc:8:18: error: expected primary-expression before 'char'
    8 |   vector<vector <char>> board(h,vector<char>(w));
      |                  ^~~~
a.cc:11:14: error: 'board' was not declared in this scope
   11 |       cin >> board.at(i).at(j);
      |              ^~~~~
a.cc:16:11: error: 'board' was not declared in this scope
   16 |       if (board.at(i).at(j) == '#') {
      |           ^~~~~
a.cc:17:9: error: 'y' was not declared in this scope
   17 |         y[i] = true;
      |         ^
a.cc:18:9: error: 'x' was not declared in this scope
   18 |         x[j] = true;
      |         ^
a.cc:23:9: error: 'y' was not declared in this scope
   23 |     if (y[i] == true) {
      |         ^
a.cc:25:13: error: 'x' was not declared in this scope
   25 |         if (x[j] == true) {
      |             ^
a.cc:26:11: error: 'cout' was not declared in this scope
   26 |           cout << board.at(i).at(j);
      |           ^~~~
a.cc:26:19: error: 'board' was not declared in this scope
   26 |           cout << board.at(i).at(j);
      |                   ^~~~~
a.cc:29:7: error: 'cout' was not declared in this scope
   29 |       cout << endl;
      |       ^~~~
a.cc:29:15: error: 'endl' was not declared in this scope
   29 |       cout << endl;
      |               ^~~~
Language: C++

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

int main(){
  int n, m;
  cin >> n >> m;
  vector<vector<char>> table(n, vector<char>(m));
  for(int i = 0; i < n; i++){
    for(int j = 0; j < m; j++){
      cin >> table.at(i).at(j);
    }
  }
  for(int i = 0; i < n; i++){
    for(int j = 0; j < m - 1; j++){
      if(table.at(i).at(j) != '.'){
        break;
      }
         else if(j == m - 1){
           table.erase.at(i);
    }
  }
  }   
  for(int j = 0; j < m; j++){
    for(int i = 0; i < n - 1; i++){
      if(table.at(i).at(j) != '.')
         break;
         else if(i = n - 1){
           for(int k = 0;k < n; k++){
             table.erase.at(k).at(j);
           }
         }
         }
         }
   for(int i = 0; i < n; i++){
     for(int j = 0; j < m; j++){
       cout << table.at(i).at(j);
     }
     cout << endl;
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: invalid use of member function 'std::vector<std::vector<char> >::erase' (did you forget the '()' ?)
   19 |            table.erase.at(i);
      |            ~~~~~~^~~~~
a.cc:29:20: error: invalid use of member function 'std::vector<std::vector<char> >::erase' (did you forget the '()' ?)
   29 |              table.erase.at(k).at(j);
      |              ~~~~~~^~~~~
Language: C++

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

int main(){
  int n, m;
  cin >> n >> m;
  vector<vector<char>> table(n, vector<char>(m));
  for(int i = 0; i < n; i++){
    for(int j = 0; j < m; j++){
      cin >> table.at(i).at(j);
    }
  }
  for(int i = 0; i < n; i++){
    for(int j = 0; j < m - 1; j++){
      if(table.at(i).at(j) != '.'){
        break;
      }
         else if(j == m - 1){
           table.erase(i);
    }
  }
  }   
  for(int j = 0; j < m; j++){
    for(int i = 0; i < n - 1; i++){
      if(table.at(i).at(j) != '.')
         break;
         else if(i = n - 1){
           for(int k = 0;k < n; k++){
             table.erase.at(k).at(j);
           }
         }
         }
         }
   for(int i = 0; i < n; i++){
     for(int j = 0; j < m; j++){
       cout << table.at(i).at(j);
     }
     cout << endl;
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:23: error: no matching function for call to 'std::vector<std::vector<char> >::erase(int&)'
   19 |            table.erase(i);
      |            ~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; iterator = std::vector<std::vector<char> >::iterator; const_iterator = std::vector<std::vector<char> >::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note:   no known conversion for argument 1 from 'int' to 'std::vector<std::vector<char> >::const_iterator'
 1536 |       erase(const_iterator __position)
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; iterator = std::vector<std::vector<char> >::iterator; const_iterator = std::vector<std::vector<char> >::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note:   candidate expects 2 arguments, 1 provided
a.cc:29:20: error: invalid use of member function 'std::vector<std::vector<char> >::erase' (did you forget the '()' ?)
   29 |              table.erase.at(k).at(j);
      |              ~~~~~~^~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  int a,b;
  scanf("%d %d",&a,&b);
  char c[a][b];
  for(int i=0; i<b; i++){
    char s[a+1];
    scanf("%s",s);
    for(int j=0; j<a; j++){
      c[j][i]=s[j];
    }
  }
  for(int i=0; i<b; i++){
    int d=1;
    for(int j=0; j<a; j++){
      if(c[j][i]=='#'){d=0;break;}
    }
    if(d){continue;}
    for(int j=0; j<a; j++){
      if(c[j][i]=='#'){
        printf("#");
      }else{
        d=1;
        for(int k=0; k<b; k++){
          if(c[j][k]=='#'){d=0;break;}
        }
        if(d==0){printf(".")};
      }
    }
    printf("\n");
  }
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:28:29: error: expected ';' before '}' token
   28 |         if(d==0){printf(".")};
      |                             ^
      |                             ;
Language: C++

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

int main(){
	int H,W;
  	cin >> H >> W;
  	vector<vector<char>> vec(H, vector<char>(W));
  	vector<bool> Hb(H, false);
  	vector<bool> Wb(W, false);
  	for(int i = 0; i < H;i++){
    	for(int j = 0; j < W;j++){
        	cin >> vec.at(i).at(j);
          	if(vec.at(i).at(j) == '#'){
            	Hb.at(i) = true;
              	Wb.at(j) = true;
            }
        }
    }
  	
  	for(int i = 0; i < H; i++){
    	if(Hb.at(i)){
        	for(int j = 0; j < W; j++){
            	if(Wb.at(j)){
                	cout << vec.at(i).at(j);
                }
            }
          cout << endl;
        }
    

Compiler output:
a.cc: In function 'int main()':
a.cc:28:10: error: expected '}' at end of input
   28 |         }
      |          ^
a.cc:20:35: note: to match this '{'
   20 |         for(int i = 0; i < H; i++){
      |                                   ^
a.cc:28:10: error: expected '}' at end of input
   28 |         }
      |          ^
a.cc:4:11: 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>> vec(H, vector<char>(W));
  	vector<bool> Hb(H, false);
  	vector<bool> Wb(W, false);
  	for(int i = 0; i < H;i++){
    	for(int j = 0; j < W;j++){
        	cin >> vec[H][W];
          	if(vec[H][W] == '#'){
            	Hb[H] = true;
              	wb[W] = true;
            }
        }
    }
  	
  	for(int i = 0; i < H; i++){
    	if(Hb[H]){
        	for(int j = 0; j < W; j++){
            	if(Wb[W]){
                	cout << vec[H][W];
                }
            }
          cout << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'wb' was not declared in this scope; did you mean 'Wb'?
   15 |                 wb[W] = true;
      |                 ^~
      |                 Wb
Language: C++

#include <iostream>
using namespace std;

int main() {
	int i,j,flag=0;
	int row[101],col[101];
	char a[101][101];

	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);

	cin>>i>>j;
	for(int m=1;m<=i;m++){
			cin>>a[m]+1;
	}
	
	for(int m=1;m<=i;m++){
		for(int n=1;n<=j;n++){
			if(a[m][n]=='#'){
			row[m]=-1;
			col[n]=-1;				
			}
		}
	}
	
	for(int m=1;m<=i;m++){
		int flag=0;
		if(row[m]!=-1) continue;
		for(int n=1;n<=j;n++){
			//printf("%c",a[m][n]);
			if(col[n]!=-1) continue;
			cout<<a[m][n];
			flag=1;
		}
		if(flag==1) cout<<"\n";
		//printf("\n");
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:10: error: expected '}' at end of input
   37 |         }
      |          ^
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;
  char A[H][W];
  bool Hans[H] = false;
  bool Wans[W] = false;
  for (int i = 0; i < H; i++){
    for (int j = 0; j < W; j++){
      cin >> A[i][j];
      if (A[i][j] == '#'){
        Hans[i] = true;
        Wans[j] = true;
      }
    }
  }
  for (int i = 0; i < H; i++){
    for (int j = 0; j < W; j++){
      if (Hans || Wans) cout << A[i][j];
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: array must be initialized with a brace-enclosed initializer
    8 |   bool Hans[H] = false;
      |                  ^~~~~
a.cc:9:18: error: array must be initialized with a brace-enclosed initializer
    9 |   bool Wans[W] = false;
      |                  ^~~~~
Language: Java


import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		
		
		Scanner scan = new Scanner(System.in);
		int x = scan.nextInt();
		int y = scan.nextInt();
		
		String[] square = new String[x];
		for (int i = 0; i < square.length; i++) {
			square[i] = scan.next();
		}
		
		boolean[] row = new boolean[x];
		boolean[] col = new boolean[y];
		
		for (int i = 0; i < row.length; i++) {
			for (int j = 0; j < col.length; j++) {
				if (square[i].charAt(j) == '#') {
					row[i] = true;
					col[j] = true;
				}
			}
		}
		
		for (int i = 0; i < row.length; i++) {
			if (row[i]) {
				for (int j = 0; j < col.length; j++) {
					if (col[j]) {
						System.out.print("#");
					}
				}
			}
			System.out.println();
		}
}

Compiler output:
Main.java:40: error: reached end of file while parsing
}
 ^
1 error
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  vector<string> grid(H);
  for (int i = 0; i < H; i++) {
    cin >> grid.at(i).at(j);
  }
  
  vector<vector<bool>> ans(H, vector<bool>(W, false));
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (grid.at(i).at(j) == '#') {
        ans.at(i).at(j) = true;
      }
    }
  }
  
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (ans.at(i).at(j)) {
        cout << grid.at(i).at(j);
      }
    }
    cout << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: 'j' was not declared in this scope
    9 |     cin >> grid.at(i).at(j);
      |                          ^
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  vector<string> grid(H);
  for (int i = 0; i < H; i++) {
    cin >> vector.at(i).at(j);
  }
  
  vector<vector<bool>> ans(H, vector<bool>(W, false));
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (grid.at(i).at(j) == '#') {
        ans.at(i).at(j) = true;
      }
    }
  }
  
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (ans.at(i).at(j)) {
        cout << grid.at(i).at(j);
      }
    }
    cout << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: missing template arguments before '.' token
    9 |     cin >> vector.at(i).at(j);
      |                  ^
a.cc:9:28: error: 'j' was not declared in this scope
    9 |     cin >> vector.at(i).at(j);
      |                            ^
Language: C++

///スマホコーディング
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<int(n);++i)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
typedef long long ll;
const int inf=1e9;
int main(){
  int h,w;cin>>h>>w;
  vectwor<vector<char>> f(h,vector<char>(w));  
  vectwor<vector<bool>> t(h,vector<bool>(w,true));
  rep(i,h)rep(j,w)cin>>f[i][j];
  rep(i,h){
    int cnt=0;
    rep(j,w)if(f[i][j]=='.')cnt++;
    if(cnt==w)rep(j,w)t[i][j]=false;
  }
  rep(j,w){
    int cnt=0;
    rep(i,h)if(f[i][j]=='.')cnt++;
    if(cnt==h)rep(i,h)t[i][j]=false;
  }
  rep(i,h)rep(j,w)if(t[i][j])cout<<f[i][j]<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'vectwor' was not declared in this scope
   10 |   vectwor<vector<char>> f(h,vector<char>(w));
      |   ^~~~~~~
a.cc:10:22: error: expected primary-expression before '>' token
   10 |   vectwor<vector<char>> f(h,vector<char>(w));
      |                      ^~
a.cc:10:25: error: 'f' was not declared in this scope
   10 |   vectwor<vector<char>> f(h,vector<char>(w));
      |                         ^
a.cc:11:22: error: expected primary-expression before '>' token
   11 |   vectwor<vector<bool>> t(h,vector<bool>(w,true));
      |                      ^~
a.cc:11:25: error: 't' was not declared in this scope
   11 |   vectwor<vector<bool>> t(h,vector<bool>(w,true));
      |                         ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }


int H,W;
vector<string> A(100);
vector<bool> HF(100), WF(100);

int main() {
  cin >> H >> W;
  rep(i,H) HF[i] = false;
  rep(i,W) WF[i] = false;

  rep(i,H) {
    bool f = true;
    rep(j,W) if(A[i][j] == "#") f = false;
    if(f) HF[i] = true;
  }

  rep(j,W) {
    bool f = true;
    rep(i,H) if(A[i][j] == "#") f = false;
    if(f) WF[j] = true;
  }

  rep(i,H) {
    rep(j,W) {
      if(HF[i] && WF[j]) cout << A[i][j];
    }
    if(HF[i]) cout << "\n";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |     rep(j,W) if(A[i][j] == "#") f = false;
a.cc:27:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |     rep(i,H) if(A[i][j] == "#") f = false;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
 int H,W;
  cin>>H>>W;
  vector<vector<char>>in(H,vector<char>(W));
  for(int i=0;i<H;i++){
	for(int j=0;j<W;j++){
      cin>>in[i][j];
    }
  }
  vector<vector<char>>out(H,vector<char>(W,'o'));
  //空白列のマーク
  for(int i=0;i<H;i++){
	for(int j=0;j<W;j++){
      if(in[i][j]=='#') break;
      if(j==W-1){
        for(int k=0;k<W;k++){
          out[i][k]='x';
        }
      }
    }
  }
  //空白行のマーク
  for(int i=0;i<H;i++){
	for(int j=0;j<W;j++){
      if(in[j][i]=='#') break;
      if(j==W-1){
        for(int k=0;k<W;k++){
          out[k][i]='x';
        }
      }
    }
  }
   for(int i=0;i<H;i++){
	for(int j=0;j<W;j++){
      if(out[i][j]=='x'){
        in[i][j]='';
      }
    }
   }
  for(int i=0;i<H;i++){
	for(int j=0;j<W;j++) {
      cout<<in[i][j];
      if(j==W-1) cout<<endl;
    }
  }
}
  
      
      

Compiler output:
a.cc:38:18: error: empty character constant
   38 |         in[i][j]='';
      |                  ^~