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

7 6
......
....#.
.#....
..#...
..#...
......
.#..#.

Compiler output:
a.cc:3:5: error: stray '#' in program
    3 | ....#.
      |     ^
a.cc:4:2: error: stray '#' in program
    4 | .#....
      |  ^
a.cc:5:3: error: stray '#' in program
    5 | ..#...
      |   ^
a.cc:6:3: error: stray '#' in program
    6 | ..#...
      |   ^
a.cc:8:2: error: stray '#' in program
    8 | .#..#.
      |  ^
a.cc:8:5: error: stray '#' in program
    8 | .#..#.
      |     ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 7 6
      | ^
Language: C++

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

int main() {
	int h;
	cin >> h;
	int w;
	cin >> w;
	vector<string> 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++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '#') {
				row[i] = true;
				col[j] = true;
			}
            cout << row[i] << 
		}
	}

	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:25:17: error: expected primary-expression before '}' token
   25 |                 }
      |                 ^
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<int> r(h);
  vector<int> c(w);
  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)=='#'){
        r.at(i)=1;
        c.at(j)=1;
      }
    }
  }
  int max=0;
  for(int j=0;j<w;j++){
    if(c(j))max=j;
  }
  for(int i=0;i<h&&r.at(i);i++){
    for(int j=0;j<w&&c.at(j);j++){
      if(j!=max){
      cout<<table.at(i).at(j)<<' ';
      }else{
      cout<<table.at(i).at(j)<<endl;
      }
    }
  }
}
 


Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: no match for call to '(std::vector<int>) (int&)'
   21 |     if(c(j))max=j;
      |        ~^~~
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<int> r(h);
  vector<int> c(w);
  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)=='#'){
        r(i)=1;
        c(j)=1;
      }
    }
  }
  int max=0;
  for(int j=0;j<w;j++){
    if(c(j))max=j;
  }
  for(int i=0;i<h&&r(i);i++){
    for(int j=0;j<w&&c(j);j++){
      if(j!=max){
      cout<<table.at(i).at(j)<<' ';
      }else{
      cout<<table.at(i).at(j)<<endl;
      }
    }
  }
}
 


Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: no match for call to '(std::vector<int>) (int&)'
   14 |         r(i)=1;
      |         ~^~~
a.cc:15:10: error: no match for call to '(std::vector<int>) (int&)'
   15 |         c(j)=1;
      |         ~^~~
a.cc:21:9: error: no match for call to '(std::vector<int>) (int&)'
   21 |     if(c(j))max=j;
      |        ~^~~
a.cc:23:21: error: no match for call to '(std::vector<int>) (int&)'
   23 |   for(int i=0;i<h&&r(i);i++){
      |                    ~^~~
a.cc:24:23: error: no match for call to '(std::vector<int>) (int&)'
   24 |     for(int j=0;j<w&&c(j);j++){
      |                      ~^~~
Language: C++

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

int main () {
  int H, W;
  cin >> H >> W;
  
  vector<string> vec(H);
  
  
  for ( i=0; i<H; i++){
      cin >> vec[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[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:11:9: error: 'i' was not declared in this scope
   11 |   for ( i=0; i<H; i++){
      |         ^
a.cc:20:10: error: 'a' was not declared in this scope
   20 |       if(a[i][j] == '#'){
      |          ^
a.cc:31:19: error: 'a' was not declared in this scope
   31 |           cout << a[i][j];
      |                   ^
Language: C++

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

int main () {
  int H, W;
  cin >> H >> W;
  
  vector<string> vec(H);
  
  
  for ( i=0; i<H; i++){
      cin >> vec[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[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: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<bool> row(h, false);
  vector<bool> col(w, false);
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      if (vec.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 << vec.at(i).at(j);
        }
      }
      cout << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: 'h' was not declared in this scope
   15 |   vector<bool> row(h, false);
      |                    ^
a.cc:16:20: error: 'w' was not declared in this scope
   16 |   vector<bool> col(w, false);
      |                    ^
Language: C++

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

int main() {
#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<bool> row(h, 0);
  vector<bool> col(w, 0);

  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      if (vec.at(i).at(j) == '#') {
        row.at(i) = 1;
        break;
      }
    }
  }

  for (int j = 0; j < w; j++) {
    for (int i = 0; i < h; i++) {
      if  (vec.at(j).at(i) == '#') {
        col.at(j) = 1;
        break;
      }
    }
  }

  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      if (row.at(i) and col.at(j)) {
        cout << vec.at(i).at(j);
      }
    }
      if (row.at(i)) {
      cout << endl;
    }
  }
}


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

#include <iostream>
using namespace std;

int main(){
  int a,b;
    cin>>a>>b;
   char c[110][110];
   for(int i =0;i<a ;i++){
     int d[i] =0;
   }
  for(int j =0;j<b;j++){
    int e[j] =0;
  }
    for(int i=0;i<a;i++){
        for(int j=0;j<b;j++){
            cin>>c[i][j];
            if(c[i][j]=='#'){
                d[i]=1; e[j]=1;
            }
        }
    }
    for(int i=0;i<a;i++){
        if(d[i] == 0) 
          continue;
        for(int j=0;j<b;j++){
            if(e[j] ==0 ) 
              continue;
          
            cout<<c[i][j];
        }
        cout<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: array must be initialized with a brace-enclosed initializer
    9 |      int d[i] =0;
      |                ^
a.cc:12:15: error: array must be initialized with a brace-enclosed initializer
   12 |     int e[j] =0;
      |               ^
a.cc:18:17: error: 'd' was not declared in this scope
   18 |                 d[i]=1; e[j]=1;
      |                 ^
a.cc:18:25: error: 'e' was not declared in this scope
   18 |                 d[i]=1; e[j]=1;
      |                         ^
a.cc:23:12: error: 'd' was not declared in this scope
   23 |         if(d[i] == 0)
      |            ^
a.cc:26:16: error: 'e' was not declared in this scope
   26 |             if(e[j] ==0 )
      |                ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b;
    cin>>a>>b;
   char c[110][110];
   for(int i =0;i<a ;i++){
     int d[i] =0;
   }
  for(int j =0;j<b;j++){
    int e[i] =0;
    for(int i=0;i<a;i++){
        for(int j=0;j<b;j++){
            cin>>c[i][j];
            if(c[i][j]=='#'){
                d[i]=1; e[j]=1;
            }
        }
    }
    for(int i=0;i<a;i++){
        if(d[i] == 0) 
          continue;
        for(int j=0;j<b;j++){
            if(e[j] ==0 ) 
              continue;
          
            cout<<c[i][j];
        }
        cout<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: array must be initialized with a brace-enclosed initializer
    9 |      int d[i] =0;
      |                ^
a.cc:12:11: error: 'i' was not declared in this scope
   12 |     int e[i] =0;
      |           ^
a.cc:17:17: error: 'd' was not declared in this scope
   17 |                 d[i]=1; e[j]=1;
      |                 ^
a.cc:17:25: error: 'e' was not declared in this scope
   17 |                 d[i]=1; e[j]=1;
      |                         ^
a.cc:22:12: error: 'd' was not declared in this scope
   22 |         if(d[i] == 0)
      |            ^
a.cc:25:16: error: 'e' was not declared in this scope
   25 |             if(e[j] ==0 )
      |                ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b;
    cin>>a>>b;
   char c[110][110];
   for(int i =0;i<a ;i++){
     d[i] =0;
   }
  for(int j =0;j<b;j++){
    e[i] =0;
    for(int i=0;i<a;i++){
        for(int j=0;j<b;j++){
            cin>>c[i][j];
            if(c[i][j]=='#'){
                d[i]=1; e[j]=1;
            }
        }
    }
    for(int i=0;i<a;i++){
        if(d[i] == 0) 
          continue;
        for(int j=0;j<b;j++){
            if(e[j] ==0 ) 
              continue;
          
            cout<<c[i][j];
        }
        cout<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'd' was not declared in this scope
    9 |      d[i] =0;
      |      ^
a.cc:12:5: error: 'e' was not declared in this scope
   12 |     e[i] =0;
      |     ^
a.cc:12:7: error: 'i' was not declared in this scope
   12 |     e[i] =0;
      |       ^
a.cc:17:17: error: 'd' was not declared in this scope
   17 |                 d[i]=1; e[j]=1;
      |                 ^
a.cc:22:12: error: 'd' was not declared in this scope
   22 |         if(d[i] == 0)
      |            ^
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int a,b;
    cin>>a>>b;
   char c[110][110];
    for(int i=0;i<a;i++){
        for(int j=0;j<b;j++){
            cin>>c[i][j];
            if(c[i][j]=='#'){
                d[i]=1; e[j]=1;
            }
        }
    }
    for(int i=0;i<a;i++){
        if(d[i] == 0) 
          continue;
        for(int j=0;j<b;j++){
            if(e[j] ==0 ) 
              continue;
          
            cout<<c[i][j];
        }
        cout<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'd' was not declared in this scope
   12 |                 d[i]=1; e[j]=1;
      |                 ^
a.cc:12:25: error: 'e' was not declared in this scope
   12 |                 d[i]=1; e[j]=1;
      |                         ^
a.cc:17:12: error: 'd' was not declared in this scope
   17 |         if(d[i] == 0)
      |            ^
a.cc:20:16: error: 'e' was not declared in this scope
   20 |             if(e[j] ==0 )
      |                ^
Language: C

#include<stdio.h>
int main(void){ 
    int h=0;
    int b=0;
    scanf("%d %d",&h,&b);
    char a[h][b];
    int c=0;
    int mark1[100]={0};
    int mark2[100]={0};
    for(int i=0;i<h;i++){
            for(int n=0;n<b;n++){
                scanf("%c",&a[i][n]);
                if(a[i][n]=='#'){
                    mark1[c]=i;
                    mark2[c]=n;
                    c++;
                }
            }
    }
    for(int v=0;v<c;v++){
        for(int l=0;l<h;l++){
            if(mark1[v]==a[l][0]){
                while (mark1[v]<c){
    mark1[v]=mark1[v+1];
    v++;
}
            }
        }
    }
    for(int p=0;p<c;p++){
        for(int y=0;y<h;y++){
            if(mark2[p]==a[y][0]){
                while (mark2[p]<c){
                        mark2[p]=mark2[p+1];
    p++;

            }
        }
    }

}

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

#include<stdio.h>
int main(void){ 
    int h=0;
    int b=0;
    scanf("%d %d",&h,&b);
    char a[h][b];
    int c=0;
    int mark1[100]={0};
    int mark2[100]={0};
    for(int i=0;i<h;i++){
            for(int n=0;n<b;n++){
                scanf("%c",&a[i][n]);
                if(a[i][n]=='#'){
                    mark1[c]=i;
                    mark2[c]=n;
                    c++;
                }
            }
    }
    for(int v=0;v<c;v++){
        for(int l=0;l<h;l++){
            if(mark1[v]==a[l][0]){
                while (mark1[v]<c){
    mark1[v]=mark1[v+1];
    v++;
}
            }
        }
    }
    for(int p=0;p<c;p++){
        for(int y=0;y<h;y++){
            if(mark2[p]==a[y][0]){
                while (mark2[p]<c){
                        mark2[p]=mark2[p+1];
    v++;

            }
        }
    }

}

Compiler output:
main.c: In function 'main':
main.c:35:5: error: 'v' undeclared (first use in this function)
   35 |     v++;
      |     ^
main.c:35:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:41:1: error: expected declaration or statement at end of input
   41 | }
      | ^
Language: C

#include<stdio.h>
int main(void){ 
    int h=0;
    int b=0;
    scanf("%d %d",&h,&b);
    char a[h][b];
    int c=0;
    int mark1[100]={0};
    int mark2[100]={0};
    for(int i=0;i<h;i++){
            for(int n=0;n<b;n++){
                scanf("%c",&a[i][n]);
                if(a[i][n]=='#'){
                    mark1[c]=i;
                    mark2[c]=n;
                    c++;
                }
            }
    }
    for(int v=0;v<c;v++){
        for(int l=0;l<h;l++){
            if(mark1[v]==a[l][0]){
                while (mark1[v]<c){
    mark1[v]=mark1[v+1];
    v++;
}
            }
        }
    }
    for(int p=0;p<c;p++){
        for(int y=0;y<h;y++){
            if(mark2[v]==a[l][0]){
                while (mark2[v]<c){
                        mark2[v]=mark2[v+1];
    v++;
}
            }
        }
    }

}

Compiler output:
main.c: In function 'main':
main.c:32:22: error: 'v' undeclared (first use in this function)
   32 |             if(mark2[v]==a[l][0]){
      |                      ^
main.c:32:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:32:28: error: 'l' undeclared (first use in this function)
   32 |             if(mark2[v]==a[l][0]){
      |                            ^
Language: C

#include<stdio.h>
int main(void){ 
    int h=0;
    int b=0;
    scanf("%d %d",&h,&b);
    char a[h][b];
    int c=0;
    int mark1[100]={0};
    int mark2[100]={0};
    for(int i=0;i<h;i++){
            for(int n=0;n<b;n++){
                scanf("%c",&a[i][n]);
                if(a[i][n]=='#'){
                    mark1[c]=i;
                    mark2[c]=n;
                    c++;
                }
            }
    }
    for(int v=0;v<c;v++){
        for(int l=0;l<h;l++){
            if(mark1[v]==a[l][0]){
                while (mark1[v]<c){
    mark1[v]=mark1[v+1];
    v++;
}
            }
        }
    }
    for(int p=0;v<c;p++){
        for(int y=0;l<h;y++){
            if(mark2[v]==a[l][0]){
                while (mark2[v]<c){
                        mark2[v]=mark2[v+1];
    v++;
}
            }
        }
    }

}

Compiler output:
main.c: In function 'main':
main.c:30:17: error: 'v' undeclared (first use in this function)
   30 |     for(int p=0;v<c;p++){
      |                 ^
main.c:30:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:21: error: 'l' undeclared (first use in this function)
   31 |         for(int y=0;l<h;y++){
      |                     ^
Language: C

#include<stdio.h>
int main(void){ 
    int h=0;
    int b=0;
    scanf("%d %d",&h,&b);
    char a[h][b];
    int c=0;
    int mark1[100]={0};
    int mark2[100]={0};
    for(int i=0;i<h;i++){
            for(int n=0;n<b;n++){
                scanf("%c",&a[i][n]);
                if(a[i][n]=='#'){
                    mark1[c]=i;
                    mark2[c]=n;
                    c++;
                }
            }
    }
    for(int v=0;v<c;v++){
        for(int l=0;l<h;l++){
            if(mark1[v]==a[l][0]){
                while (mark1[v]<c){
    mark1[v]=mark1[v+1];
    v++;
}
            }
        }
    }
    for(v=0;v<c;v++){
        for(l=0;l<h;l++){
            if(mark2[v]==a[l][0]){
                while (mark2[v]<c){
                        mark2[v]=mark2[v+1];
    v++;
}
            }
        }
    }

}


Compiler output:
main.c: In function 'main':
main.c:30:9: error: 'v' undeclared (first use in this function)
   30 |     for(v=0;v<c;v++){
      |         ^
main.c:30:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:13: error: 'l' undeclared (first use in this function)
   31 |         for(l=0;l<h;l++){
      |             ^
Language: C++

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

int main(){
  int H, W;
  cin >> H >> W;
  vector<char>sample(W, '.');
  vector<vector<char>>data(H, vector<char>(W);
  vector<int> judge(H, 0);
  
  int count = 0;
  for(int i=0; i<H; i++){
    for(int j=0; j<W; j++){
      cin >> data.at(i).at(j);
      if(data.at(i).at(j) != sample.at(j)){       
        judge.at(i) = 1;
      }
    }
    if(judge.at(i) == 1){
      count++;
    }
  }
  
  for(int i=0; i<H; i++){
    if(judge.at(i) == 1){
      for(int j=0; j<W; j++){
        cout << data.at(i).at(j);
        if(j == W-1){
          cout << endl;
        }
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:46: error: expected ')' before ';' token
    8 |   vector<vector<char>>data(H, vector<char>(W);
      |                           ~                  ^
      |                                              )
Language: C++

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

int main(){
  int H, W;
  cin >> H >> W;
  vector<char>sample(W, '.');
  vector<int> judge(H, 0);
  
  int count = 0;
  for(int i=0; i<H; i++){
    for(int j=0; j<W; j++){
      cin >> data.at(i).at(j);
      if(data.at(i).at(j) != sample.at(j)){       
        judge.at(i) = 1;
      }
    }
    if(judge.at(i) == 1){
      count++;
    }
  }
  
  for(int i=0; i<H; i++){
    if(judge.at(i) == 1){
      for(int j=0; j<W; j++){
        cout << data.at(i).at(j);
        if(j == W-1){
          cout << endl;
        }
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: overloaded function with no contextual type information
   13 |       cin >> data.at(i).at(j);
      |                   ^~
a.cc:14:15: error: overloaded function with no contextual type information
   14 |       if(data.at(i).at(j) != sample.at(j)){
      |               ^~
a.cc:26:22: error: overloaded function with no contextual type information
   26 |         cout << data.at(i).at(j);
      |                      ^~
Language: C++

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

int main(){
  int H, W;
  cin >> H >> W;
  vector<char>sample(W, '.');
  vector<vector<char>>data(H, vector<char>(W));
  //bool judge = false;
  vector<int> judge(H, 0);
  
  int count = 0;
  for(int i=0; i<H; i++){
    //bool judge = false;
    for(int j=0; j<W; j++){
      cin >> data.at(i).at(j);
      if(vector.at(i).at(j) != sample.at(j)){
        //count++;
        //judge = true;
        judge.at(i) = 1;
      }
    }
    if(judge.at(i) == 1){
      count++;
    }
  }
  
  for(int i=0; i<H; i++){
    if(judge.at(i) == 1){
      for(int j=0; j<W; j++){
        cout << data.at(i).at(j);
        if(j == W-1){
          cout << endl;
        }
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: expected unqualified-id before '.' token
   17 |       if(vector.at(i).at(j) != sample.at(j)){
      |                ^
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));
    for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      cin >> table.at(i).at(j);
    }

     vector<bool> hh(H,false);
     vector<bool> ww(W,false);
      
      for(int i; i=0; i++) {
       for(int j; j=0: j++ {
           
          if(table.at(i).at(j) == '#') {
            hh.at(i) = true;
            ww.at(i) = true;
          }
       }
    }
      
           for (int i = 0; i < h; i++) {
		if (hh.at(i) {
			for (int j = 0; j < w; j++) {
				if (ww.at(j)){
					
                  cout << a.at(i).at(j);
				}
			}
			cout << endl;
		}
	}
 
     cout << endl;
 }
            
            


Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   18 |        for(int j; j=0: j++ {
      |                   ^
a.cc:18:22: error: expected ';' before ':' token
   18 |        for(int j; j=0: j++ {
      |                      ^
      |                      ;
a.cc:25:5: error: expected primary-expression before '}' token
   25 |     }
      |     ^
a.cc:24:9: error: expected ';' before '}' token
   24 |        }
      |         ^
      |         ;
   25 |     }
      |     ~    
a.cc:25:5: error: expected primary-expression before '}' token
   25 |     }
      |     ^
a.cc:24:9: error: expected ')' before '}' token
   24 |        }
      |         ^
      |         )
   25 |     }
      |     ~    
a.cc:18:11: note: to match this '('
   18 |        for(int j; j=0: j++ {
      |           ^
a.cc:25:5: error: expected primary-expression before '}' token
   25 |     }
      |     ^
a.cc:27:32: error: 'h' was not declared in this scope
   27 |            for (int i = 0; i < h; i++) {
      |                                ^
a.cc:28:29: error: expected ')' before '{' token
   28 |                 if (hh.at(i) {
      |                    ~        ^~
      |                             )
a.cc:37:9: error: expected primary-expression before '}' token
   37 |         }
      |         ^
a.cc:40:3: error: expected '}' at end of input
   40 |  }
      |   ^
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>> table(H, vector<char>(W,));
    for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      cin >> table.at(i).at(j);
    }

     vector<bool> hh(h,false);
     vector<bool> ww(w,false);
      
      for(int i; i=0; i++) {
       for(int j; j=0: j++ {
           
          if(table.at(i).at(j) == '#') {
            hh.at(i) = true;
            ww.at(i) = true;
          }
       }
    }
      
           for (int i = 0; i < h; i++) {
		if (hh.at(i) {
			for (int j = 0; j < w; j++) {
				if (ww.at(j)){
					
                  cout << a.at(i).at(j);
				}
			}
			cout << endl;
		}
	}
 
     cout << endl;
 }
            
            

Compiler output:
a.cc: In function 'int main()':
a.cc:8:45: error: expected primary-expression before '(' token
    8 |   vector<vector<char>> table(H, vector<char>(W,));
      |                                             ^
a.cc:8:48: error: expected primary-expression before ')' token
    8 |   vector<vector<char>> table(H, vector<char>(W,));
      |                                                ^
a.cc:14:22: error: 'h' was not declared in this scope
   14 |      vector<bool> hh(h,false);
      |                      ^
a.cc:15:22: error: 'w' was not declared in this scope
   15 |      vector<bool> ww(w,false);
      |                      ^
a.cc:18:19: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
   18 |        for(int j; j=0: j++ {
      |                   ^
a.cc:18:22: error: expected ';' before ':' token
   18 |        for(int j; j=0: j++ {
      |                      ^
      |                      ;
a.cc:25:5: error: expected primary-expression before '}' token
   25 |     }
      |     ^
a.cc:24:9: error: expected ';' before '}' token
   24 |        }
      |         ^
      |         ;
   25 |     }
      |     ~    
a.cc:25:5: error: expected primary-expression before '}' token
   25 |     }
      |     ^
a.cc:24:9: error: expected ')' before '}' token
   24 |        }
      |         ^
      |         )
   25 |     }
      |     ~    
a.cc:18:11: note: to match this '('
   18 |        for(int j; j=0: j++ {
      |           ^
a.cc:25:5: error: expected primary-expression before '}' token
   25 |     }
      |     ^
a.cc:28:29: error: expected ')' before '{' token
   28 |                 if (hh.at(i) {
      |                    ~        ^~
      |                             )
a.cc:37:9: error: expected primary-expression before '}' token
   37 |         }
      |         ^
a.cc:40:3: error: expected '}' at end of input
   40 |  }
      |   ^
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));
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++)
      cin >> a.at(i).at(j);
  }
  int h = 0, w = 0;
 
    for(int i = 0; i < H; i++){
      int T = 1;
      for(int j = 0; j < W; j++){
        if(a.at(i).at(j) == '.')
          T *= 1;
        else
          T = 0;
      }
      if(T){
        h++;
        for(; i < (H - 1); i++){
          for(int j = 0; j < W; j++){
            a.at(i).at(j) = a.at(i + 1).at(j);
            a.at(H - 1).at(j) = 'a';
          }
        }
      }
    }
    
    for(int i = 0; i < W; i++){
      int T = 1;
      for(int j = 0; j < H; j++){
        if(a.at(j).at(i) == '.')
          T *= 1;
        else
          T = 0;
      }
      if(T){
        w++;
        for(; i < (W - 1); i++){
          for(int j = 0; j < H; j++){
            a.at(j).at(i) = a.at(j).at(i + 1);
            a.at(j).at(W - 1) = 'a';
          }
        }
      }
    }
  
  for(i = 0; i < H - h; i++){
    for(j = 0; j < W - w; j++){
      cout << a.at(i).at(j);
      if(j == W - w - 1)
        cout << endl;
    }
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:7: error: 'i' was not declared in this scope
   52 |   for(i = 0; i < H - h; i++){
      |       ^
a.cc:53:9: error: 'j' was not declared in this scope
   53 |     for(j = 0; j < W - w; j++){
      |         ^
Language: C++

#include<iostream>
#include<vector>
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) ;
  
  int flag1=0 ;  //一列が白のみのとき、flag1=0
  int flag2=0 ;  //一行が白のみのとき、flag2=0
  for(int i=0;i<H;i++){
    
    for(int j=0;j<W;j++){
      if(a.at(i).at(j)=='#'){
        flag1=1 ;
        break ;
      }
      if(a.at(j).at(i)=='#'){
        flag2=1 ;
        break ;
      }
    }
    
    if(flag1==0){
      W-- ;
      for(int k=0;k<H;k++){
        for(int l=j;l<W;l++) a.at(k).at(l)=a.at(k).at(l+1) ;
      }
    }
    if(flag2==0){
      H-- ;
      for(int k=0;k<W;k++){
        for(int l=j;l<H;l++) a.at(l).at(k)=a.at(l+1).at(k) ;
      }
    }
    
  }
  
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      cout<<a.at(i).at(j) ;
      if(j==W-1) cout<<endl ;
      else cout<<" " ;
    }
  }

  return 0 ;
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:30:19: error: 'j' was not declared in this scope
   30 |         for(int l=j;l<W;l++) a.at(k).at(l)=a.at(k).at(l+1) ;
      |                   ^
a.cc:36:19: error: 'j' was not declared in this scope
   36 |         for(int l=j;l<H;l++) a.at(l).at(k)=a.at(l+1).at(k) ;
      |                   ^
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);
    }
  }
  while (1) {
    int b=0;
    int c=0;
    for (int i=0; i<H; ++i) {
      int a=1;
      for (int j=0; j<W; ++j) {
        if (vec.at(i).at(j) != '.') {
          a=0;
        }
      }
      if (a==1) {
        b=1;
        c=i;
        break;
      }
    }
    if (b==1) {
      for (int k=c; k<H-1; ++k) {
        for (int j=0; j<W; ++j) {
          vec.at(i).at(j) = vec.at(i+1).at(j);
        }
      }
      H -= 1;
    }
    int d=0;
    int e=0;
    for (int i=0; i<W; ++i) {
      int a=1;
      for (int j=0; j<H; ++j) {
        if (vec.at(j).at(i) != '.') {
          a=0;
        }
      }
      if (a==1) {
        d=1;
        e=i;
        break;
      }
    }
    if (d==1) {
      for (int k=e; k<W-1; ++k) {
        for (int j=0; j<H; ++j) {
          vec.at(j).at(i) = vec.at(j).at(i+1);
        }
      }
      W -= 1;
    }
    if (b == 0 && d == 0) {
      break;
    }
  }
  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:32:18: error: 'i' was not declared in this scope
   32 |           vec.at(i).at(j) = vec.at(i+1).at(j);
      |                  ^
a.cc:55:24: error: 'i' was not declared in this scope
   55 |           vec.at(j).at(i) = vec.at(j).at(i+1);
      |                        ^
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);
    }
  }
  while (1) {
    int b=0;
    int c=0;
    for (int i=0; i<H; ++i) {
      int a=1;
      for (int j=0; j<W; ++j) {
        if (vec.at(i).at(j) != '.') {
          a=0;
        }
      }
      if (a==1) {
        b=1;
        c=i;
        break;
      }
    }
    if (b==1) {
      for (int k>=c; k<H-1; ++k) {
        for (int j=0; j<W; ++j) {
          vec.at(i).at(j) = vec.at(i+1).at(j);
        }
      }
      H -= 1;
    }
    int d=0;
    int e=0;
    for (int i=0; i<W; ++i) {
      int a=1;
      for (int j=0; j<H; ++j) {
        if (vec.at(j).at(i) != '.') {
          a=0;
        }
      }
      if (a==1) {
        d=1;
        e=i;
        break;
      }
    }
    if (d==1) {
      for (int k>=e; k<W-1; ++k) {
        for (int j=0; j<H; ++j) {
          vec.at(j).at(i) = vec.at(j).at(i+1);
        }
      }
      W -= 1;
    }
    if (b == 0 && d == 0) {
      break;
    }
  }
  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:17: error: expected ';' before '>=' token
   30 |       for (int k>=c; k<H-1; ++k) {
      |                 ^~
      |                 ;
a.cc:30:17: error: expected primary-expression before '>=' token
   30 |       for (int k>=c; k<H-1; ++k) {
      |                 ^~
a.cc:30:27: error: expected ')' before ';' token
   30 |       for (int k>=c; k<H-1; ++k) {
      |           ~               ^
      |                           )
a.cc:30:31: error: 'k' was not declared in this scope
   30 |       for (int k>=c; k<H-1; ++k) {
      |                               ^
a.cc:53:17: error: expected ';' before '>=' token
   53 |       for (int k>=e; k<W-1; ++k) {
      |                 ^~
      |                 ;
a.cc:53:17: error: expected primary-expression before '>=' token
   53 |       for (int k>=e; k<W-1; ++k) {
      |                 ^~
a.cc:53:27: error: expected ')' before ';' token
   53 |       for (int k>=e; k<W-1; ++k) {
      |           ~               ^
      |                           )
a.cc:53:31: error: 'k' was not declared in this scope
   53 |       for (int k>=e; k<W-1; ++k) {
      |                               ^
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);
    }
  }
  while (1) {
    int b=0;
    int c=0;
    for (int i=0; i<H; ++i) {
      int a=1;
      for (int j=0; j<W; ++j) {
        if (vec.at(i).at(j) != '.') {
          a=0;
        }
      }
      if (a==1) {
        b=1;
        c=i;
        break;
      }
    }
    if (b==1) {
      for (int i>=c; i<H-1; ++i) {
        for (int j=0; j<W; ++j) {
          vec.at(i).at(j) = vec.at(i+1).at(j);
        }
      }
      H -= 1;
    }
    int d=0;
    int e=0;
    for (int i=0; i<W; ++i) {
      int a=1;
      for (int j=0; j<H; ++j) {
        if (vec.at(j).at(i) != '.') {
          a=0;
        }
      }
      if (a==1) {
        d=1;
        e=i;
        break;
      }
    }
    if (d==1) {
      for (int i>=e; i<W-1; ++i) {
        for (int j=0; j<H; ++j) {
          vec.at(j).at(i) = vec.at(j).at(i+1);
        }
      }
      W -= 1;
    }
    if (b == 0 && d == 0) {
      break;
    }
  }
  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:17: error: expected ';' before '>=' token
   30 |       for (int i>=c; i<H-1; ++i) {
      |                 ^~
      |                 ;
a.cc:30:17: error: expected primary-expression before '>=' token
   30 |       for (int i>=c; i<H-1; ++i) {
      |                 ^~
a.cc:30:27: error: expected ')' before ';' token
   30 |       for (int i>=c; i<H-1; ++i) {
      |           ~               ^
      |                           )
a.cc:30:31: error: 'i' was not declared in this scope
   30 |       for (int i>=c; i<H-1; ++i) {
      |                               ^
a.cc:53:17: error: expected ';' before '>=' token
   53 |       for (int i>=e; i<W-1; ++i) {
      |                 ^~
      |                 ;
a.cc:53:17: error: expected primary-expression before '>=' token
   53 |       for (int i>=e; i<W-1; ++i) {
      |                 ^~
a.cc:53:27: error: expected ')' before ';' token
   53 |       for (int i>=e; i<W-1; ++i) {
      |           ~               ^
      |                           )
a.cc:53:31: error: 'i' was not declared in this scope
   53 |       for (int i>=e; i<W-1; ++i) {
      |                               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int i,j,h,w,k=0,l=0;
  int m[h],n[w];
  cin >> h;
  cin >> w;
  int a[h][w];
  for(i=0;i<h;i++){
    for (j=0;j<w;j++) {
      cin >> a[i][j];
    }
  }
  for(i=0;i<h;i++){
    for (j=0;j<w;j++) {
      if(a[i][j]=='#'){
        k=1;
        break;
      }
    }
    if(k==1){
      k=0;
      continue;
    }
    else{
      m[l]=i;
      l++;
    }
  }
  l=0;
  for(i=0;i<w;i++){
    for (j=0;j<h;j++) {
      if(a[i][j]=='#'){
        k=1;
        break;
      }
    }
    if(k==1){
      k=0;
      continue;
    }
    else{
      n[l]=i;
      l++;
      z=0;
    }
  }
  l=0;
  for(i=0;i<h;i++){
    for(j=0;j<w;j++){
      if(i==m[l]){
        l++;
      }
      if(j==n[z]){
        z++;
      }
      else{
        cout << a[i][j];
      }
    }
    cout << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:7: error: 'z' was not declared in this scope
   45 |       z=0;
      |       ^
a.cc:54:15: error: 'z' was not declared in this scope
   54 |       if(j==n[z]){
      |               ^
Language: C++

#include<bits/stdc++.h>
int main(){
  int i,j,h,w,k=0,l=0;
  int m[h],n[w];
  cin >> h;
  cin >> w;
  int a[h][w];
  for(i=0;i<h;i++){
    for (j=0;j<w;j++) {
      cin >> a[i][j];
    }
  }
  for(i=0;i<h;i++){
    for (j=0;j<w;j++) {
      if(a[i][j]=='#'){
        k=1;
        break;
      }
    }
    if(k==1){
      k=0;
      continue;
    }
    else{
      m[l]=i;
      l++;
    }
  }
  l=0;
  for(i=0;i<w;i++){
    for (j=0;j<h;j++) {
      if(a[i][j]=='#'){
        k=1;
        break;
      }
    }
    if(k==1){
      k=0;
      continue;
    }
    else{
      n[l]=i;
      l++;
      z=0;
    }
  }
  l=0;
  for(i=0;i<h;i++){
    for(j=0;j<w;j++){
      if(i==m[l]){
        l++;
      }
      if(j==n[z]){
        z++;
      }
      else{
        cout << a[i][j];
      }
    }
    cout << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> h;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:44:7: error: 'z' was not declared in this scope
   44 |       z=0;
      |       ^
a.cc:53:15: error: 'z' was not declared in this scope
   53 |       if(j==n[z]){
      |               ^
a.cc:57:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   57 |         cout << a[i][j];
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:60:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   60 |     cout << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:60:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   60 |     cout << endl;
      |             ^~~~
      |             std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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++){
            char aa;
            cin >> aa;
            a[i][j] = aa;
        }
    }

    vector<int> ha(h);
    vector<int> wa(w);

    for(int i=0; i<h; i++){
        bool flag = true;
        for(int j=0; j<w; j++){
            if(a[i][j]=='#'){
                flag = false;
                break;
            }
        }

        if(flag){
            ha[i] = 1;
        }
    }

    for(int i=0; i<w; i++){
        bool flag = true;
        for(int j=0; j<h; j++){
            if(a[j][i]=='#'){
                flag = false;
                break;
            }
        }

        if(flag){
            wa[i] = 1;
        }
    }

    for(int i=0; i<h; i++){
        if(ha[i]){
            continue;
        }
        for(int j=0; j<w; j++){
            if(wa[j]){
                continue;
            }
            cout << a[i][j]
        }
        cout << endl;
    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:28: error: expected ';' before '}' token
   56 |             cout << a[i][j]
      |                            ^
      |                            ;
   57 |         }
      |         ~
Language: C++

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

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++){
            char aa;
            cin >> aa;
            a[i][j] = aa;
    }

    vector<int> ha(h);
    vector<int> wa(w);

    for(int i=0; i<h; i++){
        bool flag = true;
        for(int j=0; j<w; j++){
            if(a[i][j]=='#'){
                flag = false;
                break;
            }
        }

        if(flag){
            ha[i] = 1;
        }
    }

    for(int i=0; i<w; i++){
        bool flag = true;
        for(int j=0; j<h; j++){
            if(a[j][i]=='#'){
                flag = false;
                break;
            }
        }

        if(flag){
            wa[i] = 1;
        }
    }

    for(int i=0; i<h; i++){
        if(ha[i]){
            continue;
        }
        for(int j=0; j<w; j++){
            if(wa[j]){
                continue;
            }
            cout << a[i][j]
        }
        cout << endl;
    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:28: error: expected ';' before '}' token
   55 |             cout << a[i][j]
      |                            ^
      |                            ;
   56 |         }
      |         ~                   
a.cc:62:2: error: expected '}' at end of input
   62 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

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

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++){
            char aa;
            cin >> aa;
            a[i][j] = aa;
    }

    vector<int> ha(h);
    vector<int> wa(w);

    for(int i=0; i<h; i++){
        bool flag = true;
        for(int j=0; j<w; j++){
            if(a[i][j]=='#'){
                flag = false;
                break;
            }
        }

        if(flag){
            ha[i] = 1;
        }
    }

    for(int i=0; i<w; i++){
        bool flag = true;
        for(int j=0; j<h; j++){
            if(a[j][i]=='#'){
                flag = false;
                break;
            }
        }

        if(flag){
            wa[i] = 1;
        }
    }

    for(int i=0; i<h; i++){
        if(h[i]){
            continue;
        }
        for(int j=0; j<w; j++){
            if(w[j]){
                continue;
            }
            cout << a[i][j]
        }
        cout << endl;
    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:13: error: invalid types 'int[int]' for array subscript
   48 |         if(h[i]){
      |             ^
a.cc:52:17: error: invalid types 'int[int]' for array subscript
   52 |             if(w[j]){
      |                 ^
a.cc:55:28: error: expected ';' before '}' token
   55 |             cout << a[i][j]
      |                            ^
      |                            ;
   56 |         }
      |         ~                   
a.cc:62:2: error: expected '}' at end of input
   62 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); i++)

int int_len(int n) {
  int s=0;
  while(n!=0) s++, n/=10;
  return s;
}

int int_sum(int n) {
  int m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10;
  return m;
}

int vec_sum(vector<int> v){
  int n=0;
  for(int i=0;i<v.size();i++) n+=v[i];
  return n;
}

int main() {
  int h,w;
  cin>>h>>w;
  vector<string> v(h);
  vector<bool> row(false);
  vector<bool> col(false);
  rep(i,h) cin>>v[i];
  rep(i,h){
    rep(j,w){
      if(a[i][j]=='#'){
        row[i]=true;
        col[j]=true;
      }
    }
  }
  rep(i,h){
    rep(j,w){
      if(row[i] && col[j]){
        cout<<a[i][j];
      }
    }
    cout<<endl;
  }
  
  
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:10: error: 'a' was not declared in this scope
   33 |       if(a[i][j]=='#'){
      |          ^
a.cc:42:15: error: 'a' was not declared in this scope
   42 |         cout<<a[i][j];
      |               ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:34: error: 'vec' was not declared in this scope
    9 |   vector<vector<char>> table(H , vec(W));
      |                                  ^~~
Language: C++

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

int main(){
  
  int H, W, i, j;
  cin >> H >> W;
  
  vector<vector<char>> table(H , vec1(W));
  for(i = 0; i < H; i++)
    for(j = 0; j < W; j++)
      cin >> table.at(i).at(j);
  
  vector<bool> row_h(H, false);
  vector<bool> row_w(W, false);
  
  for(i = 0; i < H; i++)
    for(j = 0; j < W; j++){
      	if(table.at(i).at(j) == '#')
          row_w.at(i) = true;
    }
   for(i = 0; i < W; i++)
    for(j = 0; j < H; j++){
      	if(table.at(j).at(i) == '#')
          row_h.at(i) = true;
    }
  for(i = 0; i < H; i++){
    for(j = 0; j < W; j++){
      if(row_h.at(i) == true && rpw_w.at(j) == true)
        cout << table.at(i).at(j);
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:34: error: 'vec1' was not declared in this scope
    9 |   vector<vector<char>> table(H , vec1(W));
      |                                  ^~~~
a.cc:29:33: error: 'rpw_w' was not declared in this scope; did you mean 'row_w'?
   29 |       if(row_h.at(i) == true && rpw_w.at(j) == true)
      |                                 ^~~~~
      |                                 row_w