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

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		solve();
	}

	public static void solve() {
  		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int h = sc.nextInt();
		int w = sc.nextInt();
		sc.nextLine();
		String[] t = new String[h];
		for(int i = 0; i < h; i++){
			t[i] = sc.nextLine();
		}
		sc.close();

 		for(int i = 0; i < h+2; i++){
			if(i == 0 || i == h+1){
				for(int j = 0; j < w+2; j++){
					out.print("#");
				}
				out.println();
			}else{
				out.println("#" + t[i-1] + "#");
			}
		}
		out.flush();
	}

	static class Pair{
		int a,b;
		public Pair(int a, int b){
			this.a = a;
			this.b = b;
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.PrintWriter;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.ArrayList;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.Collection;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.Collections;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.util.HashMap;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.util.List;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import java.util.Map;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
    8 | import java.util.Scanner;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1: error: expected unqualified-id before 'public'
   10 | public class Main{
      | ^~~~~~
Language: C++

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

int main()
{
  int a, b;
  cin>>a>>d;
  vector<string> mozi(b);
  
  for(int i=0;i<b+2;i++)
  {
    cout<<"#";
  }
  cout<<endl;
  
  for(int i=0;i<a;i++)
  {
    cin>>mozi[i];
    
    cout<<"#"<<mozi[i]<<"#"<<endl;
  }
  for(int i=0;i<b+2;i++)
  {
    cout<<"#";
  }
  cout<<endl
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'd' was not declared in this scope
    7 |   cin>>a>>d;
      |           ^
a.cc:26:13: error: expected ';' before '}' token
   26 |   cout<<endl
      |             ^
      |             ;
   27 | }
      | ~
Language: C++

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

int main() {
  int H, W;
  cin >> H >> M;
  vector<string> X(H+1);
  for(int i=1; i<=H; i++) {
    cin >> X[i];
  }
  for(int i=0; i<H+2; i++) {
    if(i==0 || i==H+1) {
      for(int j=0; j<M+2; j++) {
        cout << "#";
      }
      cout << endl;
    }
    else {
      cout << "#" << X[i] << "#" << endl;
    }
  }
  return 0;
}

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

#include<string>

using namespace std;

int main(void){
  int H, W;
  cin >> H >> W;
  for(int i = 0; i < W + 2; i++) cout << "#" << "\n";
  for(int i = 0; i < H; i++){
    string a;
    cin >> a;
    cout << "#" << a << "#" << "\n";
  }
  for(int i = 0; i < W + 2; i++) cout << "#" << "\n";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> H >> W;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<string>
  +++ |+#include <iostream>
    2 | 
a.cc:8:34: error: 'cout' was not declared in this scope
    8 |   for(int i = 0; i < W + 2; i++) cout << "#" << "\n";
      |                                  ^~~~
a.cc:8:34: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << "#" << a << "#" << "\n";
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:34: error: 'cout' was not declared in this scope
   14 |   for(int i = 0; i < W + 2; i++) cout << "#" << "\n";
      |                                  ^~~~
a.cc:14:34: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

#define REP(i, n) for(int i=0; i<n;i++)
#define REPR(i, n) for(int i=n-1 ; i>=0; i--)
#define FOR(i, m, n) for(int i=m; i<n; i++)

#define INF 2e9
#define ll long long

int main(){
    int h, w;
    cin>>h>>w;
    int a[i][j];
    REP(i, h){
        REP(j, w){
            cin>>a[i][j];
        }
    }
    REP(i, w){
        cout<<"#";
    }
    cout<<endl;
    REP(i, h){
        cout<<"#";
        REP(j, w){
            cout<<a[i][j];
        }
        cout<<"#"<<endl;
    }
    REP(i, w){
        cout<<"#";
    }
    cout<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: 'i' was not declared in this scope
   14 |     int a[i][j];
      |           ^
a.cc:14:14: error: 'j' was not declared in this scope
   14 |     int a[i][j];
      |              ^
a.cc:17:18: error: 'a' was not declared in this scope
   17 |             cin>>a[i][j];
      |                  ^
a.cc:27:19: error: 'a' was not declared in this scope
   27 |             cout<<a[i][j];
      |                   ^
Language: C++

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

int main(){
  int c,d;
string a,d,e,s,sum;
cin>>c>>d;

  for(int i=0;i<c+2;i++){
    for(int j=0;j<d+2;j++){
      if(i==0||i==c+1||j==0||j==d+1){
        cout<<'#';
      }
      else{
        cin>>a;
        cout<<a;
      }
    }
    cout<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: conflicting declaration 'std::string d'
    7 | string a,d,e,s,sum;
      |          ^
a.cc:6:9: note: previous declaration as 'int d'
    6 |   int c,d;
      |         ^
Language: C++

    int A,B;
    cin >> A;
    cin >> B;
    vector<string> S(A);
    for(int i = 0;i < (B + 2);i++){
        cout << "#";
    }
    cout << endl;
        for(int i = 0;i < A;i++){
        cin >> S.at(i);
        cout << "#" << S.at(i) << "#" << endl;
    }
        for(int i = 0;i < (B + 2);i++){
        cout << "#";
    }
}

Compiler output:
a.cc:2:5: error: 'cin' does not name a type
    2 |     cin >> A;
      |     ^~~
a.cc:3:5: error: 'cin' does not name a type
    3 |     cin >> B;
      |     ^~~
a.cc:4:5: error: 'vector' does not name a type
    4 |     vector<string> S(A);
      |     ^~~~~~
a.cc:5:5: error: expected unqualified-id before 'for'
    5 |     for(int i = 0;i < (B + 2);i++){
      |     ^~~
a.cc:5:19: error: 'i' does not name a type
    5 |     for(int i = 0;i < (B + 2);i++){
      |                   ^
a.cc:5:31: error: 'i' does not name a type
    5 |     for(int i = 0;i < (B + 2);i++){
      |                               ^
a.cc:8:5: error: 'cout' does not name a type
    8 |     cout << endl;
      |     ^~~~
a.cc:9:9: error: expected unqualified-id before 'for'
    9 |         for(int i = 0;i < A;i++){
      |         ^~~
a.cc:9:23: error: 'i' does not name a type
    9 |         for(int i = 0;i < A;i++){
      |                       ^
a.cc:9:29: error: 'i' does not name a type
    9 |         for(int i = 0;i < A;i++){
      |                             ^
a.cc:13:9: error: expected unqualified-id before 'for'
   13 |         for(int i = 0;i < (B + 2);i++){
      |         ^~~
a.cc:13:23: error: 'i' does not name a type
   13 |         for(int i = 0;i < (B + 2);i++){
      |                       ^
a.cc:13:35: error: 'i' does not name a type
   13 |         for(int i = 0;i < (B + 2);i++){
      |                                   ^
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin >> H >> W;
  int i;
  char a;
  
  for(i=0;i<H+2;i++){
    if((i == 0)|(i==H+1)){
      for(j=0;j<W+2;j++){
        cout << '#';
      }
      cout << endl;
    }
    else{
      cout << '#';
      for(j=0;j<W+1;j++){
        cin >> a;
        cout << a;
      }
      cout << '#' << endl;
    }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'j' was not declared in this scope
   12 |       for(j=0;j<W+2;j++){
      |           ^
a.cc:19:11: error: 'j' was not declared in this scope
   19 |       for(j=0;j<W+1;j++){
      |           ^
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
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;
  int i;
  char a;
  
  for(i=0;i<H+2;i++){
    if((i == 0)||(i==H+1)){
      for(j=0;j<W+2;j++){
        cout << '#';
      }
    }
    else{
      cout << '#';
      for(j=0;j<W+1;j++){
        cin >> a;
        cout << a;
      }
      cout << '#' << endl;
    }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'j' was not declared in this scope
   12 |       for(j=0;j<W+2;j++){
      |           ^
a.cc:18:11: error: 'j' was not declared in this scope
   18 |       for(j=0;j<W+1;j++){
      |           ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
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;
  int i;
  char a;
  
  for(i=0;i<H+2;i++){
    if((i == 0)||(i==H+1){
      for(j=0;j<W+1;j++){
        cout << '#';
      }
    }
    else{
      cout << '#';
      for(j=0;j<W+1;j++){
        cin >> a;
        cout << a;
      }
      cout << '#' << endl;
    }
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected ')' before '{' token
   11 |     if((i == 0)||(i==H+1){
      |       ~                  ^
      |                          )
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
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, w;
	cin >> H >> W;
	
	w = W;
	W = W + 2;
	char Frame = "#";
	for(int i = 0; i < W; i++) {
		cout << Frame;
	}
	cout << endl;
	
	string str;
	for(int i = 0; i < H; i++) {
		str = "";
		for(int j = 0; j < w; j++) {
			cin >> str;
		}
		cout << "#" << str << "#" << endl; 
	}
	
	for(int i = 0; i < W; i++) {
		cout << Frame;
	}
	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   10 |         char Frame = "#";
      |                      ^~~
      |                      |
      |                      const char*
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H, W;
  cin >> H >> W;
  
  for (int i = 0; i < W + 2; i++) {
    cout << '#';    
  }
  cout << endl;
  
  for (int i = 0; i < H, i++) {
    cout << '#';
    
    vector<string> vec(W);
    for (int j = 0; j < W, j++) {
      cin >> vec.at(j);
    }
    for (int j = 0; j < W, j++) {
      cout << vec.at(j);
    }
    cout << '#' << endl;
    
  }  

  for (int i = 0; i < W + 2; i++) {
    cout << '#';    
  }
  cout << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: expected ';' before ')' token
   13 |   for (int i = 0; i < H, i++) {
      |                             ^
      |                             ;
a.cc:17:31: error: expected ';' before ')' token
   17 |     for (int j = 0; j < W, j++) {
      |                               ^
      |                               ;
a.cc:20:31: error: expected ';' before ')' token
   20 |     for (int j = 0; j < W, j++) {
      |                               ^
      |                               ;
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;

int main() {
	int H, W;

	cin >> H >> W;

	for (int i = 0 ; i < H + 2 ; i++ ) {
		cout << '#'
	}

	cout << endl;

	for (int i = 0 ; i < H ; i++ ) {
		vector<char> line(W);

		for (int j = 0 ; j < W ; j++ ) {
			cin >> line.at(j);
		}

		cout << '#';

		for (int j = 0 ; j < W ; j++ ) {
			cout << line.at(j);
		}

		cout << '#' << endl;
	}

	for (int i = 0 ; i < H + 2 ; i++ ) {
		cout << '#'
	}

	cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:28: error: expected ';' before '}' token
   24 |                 cout << '#'
      |                            ^
      |                            ;
   25 |         }
      |         ~                   
a.cc:46:28: error: expected ';' before '}' token
   46 |                 cout << '#'
      |                            ^
      |                            ;
   47 |         }
      |         ~
Language: C++

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

/* メモリ食い過ぎ注意 */
#define int long long

typedef long long ll;

ll gcd(ll a, int b)
{
    if (a < b)
        gcd(b, a);
    if (b == 0)
        return a;
    int r;
    while ((r = a % b))
    {
        a = b;
        b = r;
    }
    return b;
}

/* define const */
const ll INF = (1ll << 60);
const ll MOD = (ll)1e9 + 7;
/* end defineing */

signed main()
{
    int h, w;
    string s[100];
    cin >> h >> w;
    for (int i = 0; i < h; i++)
        cin >> s[i];

    for (int i = 0; i < n + 2; i++)
        cout << "#";
    cout << endl;
    for (int i = 0; i < h; i++)
    {
        cout << "#";
        cout << s[i];
        cout << "#" << endl;
    }
    for (int i = 0; i < n + 2; i++)
        cout << "#";
    cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:37:25: error: 'n' was not declared in this scope
   37 |     for (int i = 0; i < n + 2; i++)
      |                         ^
a.cc:46:25: error: 'n' was not declared in this scope
   46 |     for (int i = 0; i < n + 2; i++)
      |                         ^
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 < (W + 2)) {
    cout << "#";
  }
  cout << endl;
  
  for (int j = 0; j < H; j++) {
    cin >> vec.at(j);
    cout << "#" << vec.at(j) << "#" << endl;
  }
  
   for (int i = 0; i < (W + 2)) {
    cout << "#";
  }
  cout << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: expected ';' before ')' token
   10 |   for (int i = 0; i < (W + 2)) {
      |                              ^
      |                              ;
a.cc:20:31: error: expected ';' before ')' token
   20 |    for (int i = 0; i < (W + 2)) {
      |                               ^
      |                               ;
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 < W + 2) {
    cout << "#";
  }
  cout << endl;
  
  for (int j = 0; j < H; j++) {
    cin >> vec.at(j);
    cout << "#" << vec.at(j) << "#" << endl;
  }
  
   for (int i = 0; i < W + 2) {
    cout << "#";
  }
  cout << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: expected ';' before ')' token
   10 |   for (int i = 0; i < W + 2) {
      |                            ^
      |                            ;
a.cc:20:29: error: expected ';' before ')' token
   20 |    for (int i = 0; i < W + 2) {
      |                             ^
      |                             ;
Language: C++

H, W = map(int, input().split())
a = [""] * H
for i in range(H):
    a[i] = input()

print("#" * (W * 2))
for i in range(H):
    print('#', a[i], "#", sep="")
print("#" * (W * 2))


Compiler output:
a.cc:1:1: error: 'H' does not name a type
    1 | H, W = map(int, input().split())
      | ^
Language: C++

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

int main() {
  int a,b;
  cin >>a>>b;
  
  for(i=0;i<b+2;i++)
    cout<<"#";
  cout<<endl;
  
  for(i=0;i<a;i++){
    int str;
    cin>>str;
    cout<<"#"<<str<<"#"<<endl;
    
  }
  
    for(i=0;i<b+2;i++)
    cout<<"#";
  cout<<endl;
}


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

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

int main() {
  int a,b;
  cin >>a>>b;
  
  for(i=0;i<b+2;i++)
    cout<<#;
  cout<<endl;
  
  for(i=0;i<a;i++){
    int str;
    cin>>str;
    cout<<"#"<<str<<"#"<<endl;
    
  }
  
    for(i=0;i<b+2;i++)
    cout<<#;
  cout<<endl;
}


Compiler output:
a.cc:9:11: error: stray '#' in program
    9 |     cout<<#;
      |           ^
a.cc:20:11: error: stray '#' in program
   20 |     cout<<#;
      |           ^
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i<b+2;i++)
      |       ^
a.cc:9:12: error: expected primary-expression before ';' token
    9 |     cout<<#;
      |            ^
a.cc:12:7: error: 'i' was not declared in this scope
   12 |   for(i=0;i<a;i++){
      |       ^
a.cc:19:9: error: 'i' was not declared in this scope
   19 |     for(i=0;i<b+2;i++)
      |         ^
a.cc:20:12: error: expected primary-expression before ';' token
   20 |     cout<<#;
      |            ^
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)
  }
  for(int i=0;i<h+2;i++){
    if(i==0||i==h+1){
      for(int j=0;j<w+2;j++){
        cout << "#";
      }
      cout << endl;
    }
    else{
      cout << "#" << a.at(i-1) << "#" << endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before '}' token
    9 |     cin >> a.at(i)
      |                   ^
      |                   ;
   10 |   }
      |   ~
Language: C++

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

int main(){
  int H,W;
  cin >>H >>W;
  vector<string> a(H*W);
  for(int i=0; i<H*W; i++)
    cin >>a.at(i);
  for(int i=0;i<W+2;i++)
    cout <<'#' ;
  for(int j=0;j<H;j++){
    cout <<endl <<'#';
    for(int i=0; i<W;i++)
      cout <<A.at(j*W+i);
    cout <<'#';
  }
  cout<<endl;
  for(int i=0;i<W+2;i++)
    cout <<'#' ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'A' was not declared in this scope
   15 |       cout <<A.at(j*W+i);
      |              ^
Language: C++

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

int main(){
  int H,W;
  cin >>H >>W;
  vector<string> a(H*W);
  for(int i=0; i<H*W; i++)
    cin >>a.at(i);
  for(int i=0;i<W+2;i++)
    cout <<'#' ;
  for(int j=0;j<H;j++){
    cout <<endl <<'#';
    for(int i=0; i<)
      cout <<A.at(j*W+i);
    cout <<'#';
  }
  cout<<endl;
  for(int i=0;i<W+2;i++)
    cout <<'#' ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected primary-expression before ')' token
   14 |     for(int i=0; i<)
      |                    ^
a.cc:14:20: error: expected ';' before ')' token
   14 |     for(int i=0; i<)
      |                    ^
      |                    ;
a.cc:15:14: error: 'A' was not declared in this scope
   15 |       cout <<A.at(j*W+i);
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main () {
  int H, W;
  cin >> H >> W;
  
  cout << string(W + 2, '#') << endl;
  
  for (int i = 0; i < H; i++) {
    string h;
    cin >> h;
    cout << '#' << h << '#' << endl;
  }
  
  cout << string(W + 2, '#') << endl;
}
  
#include <bits/stdioc++.h>
using namespace std;
 
int main () {
  int H, W;
  cin >> H >> W;
  
  cout << string(W + 2, '#') << endl;
  
  for (int i = 0; i < H; i++) {
    string h;
    cin >> h;
    cout << '#' << h << '#' << endl;
  }
  
  cout << string(W + 2, '#') << endl;
}
  
提出情報

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

#include <bits/stdioc++.h>
using namespace std;
 
int main () {
  int H, W;
  cin >> H >> W;
  
  cout << string(W + 2, '#') << endl;
  
  for (int i = 0; i < H; i++) {
    string h;
    cin >> h;
    cout << '#' << h << '#' << endl;
  }
  
  cout << string(W + 2, '#') << endl;
}
  

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

#include <bits/stdioc++.h>;
using namespace std;
 
int main () {
  int H, W;
  cin >> H >> W;
  
  cout >> string(W + 2, '#') >> endl;
  
  for (int i = 0; i < H + 2; i++) {
    string h;
    cin >> h;
    cout >> '#' >> h >> '#' >> endl;
  }
  
  cout >> string(W + 2, '#') >> endl;
}
  

Compiler output:
a.cc:1:27: warning: extra tokens at end of #include directive
    1 | #include <bits/stdioc++.h>;
      |                           ^
a.cc:1:10: fatal error: bits/stdioc++.h: No such file or directory
    1 | #include <bits/stdioc++.h>;
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main () {
  int H, W;
  cin >> H >> W;
  
  cout >> string(W + 2, '#') >> endl;
  
  for (int i = 0; i < H + 2; i++) {
    string h;
    cin >> h;
    cout >> '#' >> h >> '#' >> endl;
  }
  
  cout >> string(W + 2, '#') >> endl;
}
  

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

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

int main() {
  int H, W;
  cin >> H >> W;
  vector<string> output(H);
  for (int i = 0; i < H; i++) cin >> vector[i];
  cout << '#' * (W + 2) << endl;
  for (int i = 0; i < H; i++) cout << '#' << vector[i] << '#' << endl;
  cout << '#' * (W + 2) << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:44: error: missing template arguments before '[' token
    8 |   for (int i = 0; i < H; i++) cin >> vector[i];
      |                                            ^
a.cc:10:52: error: missing template arguments before '[' token
   10 |   for (int i = 0; i < H; i++) cout << '#' << vector[i] << '#' << endl;
      |                                                    ^
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  vector<string> output(H);
  for (int i = 0, i < H, i++) cin >> vector[i];
  cout << '#' * (W + 2) << endl;
  for (int i = 0, i < H, i++) cout << '#' << vector[i] << '#' << endl;
  cout << '#' * (W + 2) << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before '<' token
    8 |   for (int i = 0, i < H, i++) cin >> vector[i];
      |                    ^~
      |                    ;
a.cc:8:21: error: expected primary-expression before '<' token
    8 |   for (int i = 0, i < H, i++) cin >> vector[i];
      |                     ^
a.cc:8:29: error: expected ';' before ')' token
    8 |   for (int i = 0, i < H, i++) cin >> vector[i];
      |                             ^
      |                             ;
a.cc:8:44: error: missing template arguments before '[' token
    8 |   for (int i = 0, i < H, i++) cin >> vector[i];
      |                                            ^
a.cc:10:20: error: expected ';' before '<' token
   10 |   for (int i = 0, i < H, i++) cout << '#' << vector[i] << '#' << endl;
      |                    ^~
      |                    ;
a.cc:10:21: error: expected primary-expression before '<' token
   10 |   for (int i = 0, i < H, i++) cout << '#' << vector[i] << '#' << endl;
      |                     ^
a.cc:10:29: error: expected ';' before ')' token
   10 |   for (int i = 0, i < H, i++) cout << '#' << vector[i] << '#' << endl;
      |                             ^
      |                             ;
a.cc:10:52: error: missing template arguments before '[' token
   10 |   for (int i = 0, i < H, i++) cout << '#' << vector[i] << '#' << endl;
      |                                                    ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n.m;
  cin >> n >> m;
  char a[n][m];
  for(int i=0;i<n;i++){
    for(int j=0;j<m;j++){
      cin >> a[i][j];
    }
  }
  char b[n+2][m+2];
  for(int i=0;i<n+2;i++){
    b[i][0]='#';
    b[i][m+1]='#';
  }
  for(int i=0;i<m+2;i++){
    b[0][i]='#';
    b[n+1][i]='#';
  }
  for(int i=1;i<n+1;i++){
    for(int j=1;j<m+1;j++){
      b[i][j]=a[i-1][j-1];
    }
  }
  for(int i=0;i<n+2;i++){
    for(int j=0;j<m+2;j++){
      cout << b[i][j];
    }
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected initializer before '.' token
    5 |   int n.m;
      |        ^
a.cc:6:10: error: 'n' was not declared in this scope
    6 |   cin >> n >> m;
      |          ^
a.cc:6:15: error: 'm' was not declared in this scope; did you mean 'tm'?
    6 |   cin >> n >> m;
      |               ^
      |               tm
a.cc:10:14: error: 'a' was not declared in this scope
   10 |       cin >> a[i][j];
      |              ^
a.cc:15:5: error: 'b' was not declared in this scope
   15 |     b[i][0]='#';
      |     ^
a.cc:19:5: error: 'b' was not declared in this scope
   19 |     b[0][i]='#';
      |     ^
a.cc:24:7: error: 'b' was not declared in this scope
   24 |       b[i][j]=a[i-1][j-1];
      |       ^
a.cc:24:15: error: 'a' was not declared in this scope
   24 |       b[i][j]=a[i-1][j-1];
      |               ^
a.cc:29:15: error: 'b' was not declared in this scope
   29 |       cout << b[i][j];
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	int a,b;
	cin>>a>>b;
	for(int i=0; i<b+2; i++){
		cout<<'#';
	}
	cout<<endl;
	//最初の＃
	
	for(int j=0; j<a; j++){
		cout<<'#';
		vector<string> vec(b);
		fou(int m=0; m<b; m++){
			cin>>vec.at(i);
			cout<<vec.at(i);
		}
		cout<<'#';<<endl;
	}
	
	for(int i=0; i<b+2; i++){
		cout<<'#';
	}
	cout<<endl;
	//最後の＃
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: expected primary-expression before 'int'
   15 |                 fou(int m=0; m<b; m++){
      |                     ^~~
a.cc:15:30: error: 'm' was not declared in this scope
   15 |                 fou(int m=0; m<b; m++){
      |                              ^
a.cc:19:27: error: expected primary-expression before '<<' token
   19 |                 cout<<'#';<<endl;
      |                           ^~
Language: C++

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

int main() {
  int N,W;
  char R[100][100];
  cin >> H >> W;
  for(int y=0;y<H+2;y++){
    for(int x=0;x<W+2;x++){
      if(x==0||y==0)
        R[x][y]="#";
      else
        cin>>R[x][y];
    }
  }

  for(int y=0;y<H+2;y++){
    for(int x=0;x<W+2;x++){
      cout<<R[x][y];
    }
    cout<<"\n";
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'H' was not declared in this scope
    7 |   cin >> H >> W;
      |          ^
a.cc:11:17: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   11 |         R[x][y]="#";
      |                 ^~~
      |                 |
      |                 const char*
Language: C++

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

int main(){
    int h, w, i;
    string s;
    cin >> h >> w;
    for(i=0; i<w+2; i++){
        cout << '#'
    }
    cout << '\n';
    for(i=0; i<h; i++){
        cout << '#';
        cin >> s;
        cout << s;
        cout << "#\n";
    }
    for(i=0; i<w+2; i++){
        cout << '#'
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before '}' token
    9 |         cout << '#'
      |                    ^
      |                    ;
   10 |     }
      |     ~               
a.cc:19:20: error: expected ';' before '}' token
   19 |         cout << '#'
      |                    ^
      |                    ;
   20 |     }
      |     ~
Language: C

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

int main(){
    int h,w;
    cin>>h>>w;

    for(int i=0;i<w+2;i++)cout<<"#";
    cout<<endl;
    for(int i=0;i<h;i++){
        string s; cin>>s;
        cout<<"#"<<s<<"#"<<endl;
    }
    for(int i=0;i<w+2;i++)cout<<"#";
    cout<<endl;
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
char a[100][101], b[102][102];
int main() {
int H, W; cin >> H >> W;
for (int i = 0; i < H; i++)
scanf("%s", a[i]);
1
for (int i = 0; i < H + 2; i++)
for (int j = 0; j < W + 2; j++)
b[i][j] = ’#’;
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
b[i + 1][j + 1] = a[i][j];
for (int i = 0; i < H + 2; i++) {
for (int j = 0; j < W + 2; j++)
cout << b[i][j];
cout << endl;
}
}


Compiler output:
a.cc:11:11: error: extended character ’ is not valid in an identifier
   11 | b[i][j] = ’#’;
      |           ^
a.cc:11:12: error: stray '#' in program
   11 | b[i][j] = ’#’;
      |            ^
a.cc:11:13: error: extended character ’ is not valid in an identifier
   11 | b[i][j] = ’#’;
      |             ^
a.cc: In function 'int main()':
a.cc:8:2: error: expected ';' before 'for'
    8 | 1
      |  ^
      |  ;
    9 | for (int i = 0; i < H + 2; i++)
      | ~~~
a.cc:9:17: error: 'i' was not declared in this scope
    9 | for (int i = 0; i < H + 2; i++)
      |                 ^
a.cc:10:17: error: 'j' was not declared in this scope
   10 | for (int j = 0; j < W + 2; j++)
      |                 ^
Language: C++

char a[100][101], b[102][102];
int main() {
int H, W; cin >> H >> W;
for (int i = 0; i < H; i++)
scanf("%s", a[i]);
1
for (int i = 0; i < H + 2; i++)
for (int j = 0; j < W + 2; j++)
b[i][j] = ’#’;
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
b[i + 1][j + 1] = a[i][j];
for (int i = 0; i < H + 2; i++) {
for (int j = 0; j < W + 2; j++)
cout << b[i][j];
cout << endl;
}
}


Compiler output:
a.cc:9:11: error: extended character ’ is not valid in an identifier
    9 | b[i][j] = ’#’;
      |           ^
a.cc:9:12: error: stray '#' in program
    9 | b[i][j] = ’#’;
      |            ^
a.cc:9:13: error: extended character ’ is not valid in an identifier
    9 | b[i][j] = ’#’;
      |             ^
a.cc: In function 'int main()':
a.cc:3:11: error: 'cin' was not declared in this scope
    3 | int H, W; cin >> H >> W;
      |           ^~~
a.cc:5:1: error: 'scanf' was not declared in this scope
    5 | scanf("%s", a[i]);
      | ^~~~~
a.cc:6:2: error: expected ';' before 'for'
    6 | 1
      |  ^
      |  ;
    7 | for (int i = 0; i < H + 2; i++)
      | ~~~
a.cc:7:17: error: 'i' was not declared in this scope
    7 | for (int i = 0; i < H + 2; i++)
      |                 ^
a.cc:8:17: error: 'j' was not declared in this scope
    8 | for (int j = 0; j < W + 2; j++)
      |                 ^
a.cc:15:1: error: 'cout' was not declared in this scope
   15 | cout << b[i][j];
      | ^~~~
a.cc:16:1: error: 'cout' was not declared in this scope
   16 | cout << endl;
      | ^~~~
a.cc:16:9: error: 'endl' was not declared in this scope
   16 | cout << endl;
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
{
  char a[101][101];
  char b[102][102];
  int H,W;
  cin>>H,W;
  for(int i=0;i<H;i++)
    scanf("%s",a[i]);
  for(int i=0;i<H+2;i++)
    for(int j=0;j<W+2;j++)
      b[i][j]='#';
  for(int i=0;i<H;i++)
    for(int j=0;j<W;j++)
      b[i+1][j+1]=a[i][j];
  for(int i=0;i<H;i++)
    for(int j=0;j<W;j++)
      cout<<b[i][j];
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before '{' token
    3 | {
      | ^
Language: C++


char a[100][101], b[102][102];
int main() {
int H, W; cin >> H >> W;
for (int i = 0; i < H; i++)
scanf("%s", a[i]);
1
for (int i = 0; i < H + 2; i++)
for (int j = 0; j < W + 2; j++)
b[i][j] = ’#’;
for (int i = 0; i < H; i++)
for (int j = 0; j < W; j++)
b[i + 1][j + 1] = a[i][j];
for (int i = 0; i < H + 2; i++) {
for (int j = 0; j < W + 2; j++)
cout << b[i][j];
}

Compiler output:
a.cc:10:11: error: extended character ’ is not valid in an identifier
   10 | b[i][j] = ’#’;
      |           ^
a.cc:10:12: error: stray '#' in program
   10 | b[i][j] = ’#’;
      |            ^
a.cc:10:13: error: extended character ’ is not valid in an identifier
   10 | b[i][j] = ’#’;
      |             ^
a.cc: In function 'int main()':
a.cc:4:11: error: 'cin' was not declared in this scope
    4 | int H, W; cin >> H >> W;
      |           ^~~
a.cc:6:1: error: 'scanf' was not declared in this scope
    6 | scanf("%s", a[i]);
      | ^~~~~
a.cc:7:2: error: expected ';' before 'for'
    7 | 1
      |  ^
      |  ;
    8 | for (int i = 0; i < H + 2; i++)
      | ~~~
a.cc:8:17: error: 'i' was not declared in this scope
    8 | for (int i = 0; i < H + 2; i++)
      |                 ^
a.cc:9:17: error: 'j' was not declared in this scope
    9 | for (int j = 0; j < W + 2; j++)
      |                 ^
a.cc:16:1: error: 'cout' was not declared in this scope
   16 | cout << b[i][j];
      | ^~~~
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin>>H>>W;
  vector<vector<string>>vec(H,vector<string>(W));
  for(int i=0;i<H;++i){
    for(int j=0;j<W;++j){
      cin>>vec.at(i).at(j);
      }
    }
  int k=0;
  while(k<W+2){
  cout<<'#';
  k++;
  }
  cout<<endl;
  for(int i=0;i<H;i++){
    cout<<'#';
    for(int j=0;j<W;j++){
      cout<<vec.at(i).at(j);
      }
    cout<<'#'<<endl;
  }
  int k=0;
  while(k<W+2){
  cout<<'#';
  k++;
  }
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:26:7: error: redeclaration of 'int k'
   26 |   int k=0;
      |       ^
a.cc:13:7: note: 'int k' previously declared here
   13 |   int k=0;
      |       ^
Language: C++

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

int main(){
  int H,W;
  cin >> H >> W;
  
  vector <vector<char>> pic(H+2, vector<char> (W+2)); 
  for(int i=0; i<W+2; i++){
    cout << '#';
  }
  cout << endl;
  
  for (int i=1; i<H+1; i++){
    pic.at(i).at(0) = '#';
    pic.at(i).at(W+1) = '#';
    for (int j=1; j<W+1; j++){
      cin >> pic.at(i).at(j);
    }
    for(int j=0; j<W+2; j++){
      cout << pic.at(i)(j);
    }
  cout << endl;
  }
  
  for(int i=0; i<W+2; i++){
    cout << '#';
  }
  cout << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: no match for call to '(__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type {aka std::vector<char>}) (int&)'
   21 |       cout << pic.at(i)(j);
      |               ~~~~~~~~~^~~
Language: C++

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

int main(){
  int H,W;
  cin >> H >> W;
  
  vector <vector<char>> pic(H+2, vector<char> (W+2)); 
  for(int i=0; i<W+2, i++){
    cout << '#';
  }
  cout << endl;
  
  for (int i=1; i<H+1; i++){
    pic.at(i).at(0) = '#';
    pic.at(i).at(W+1) = '#';
    for (int j=1; j<W+1; j++){
      cin >> pic.at(i).at(j);
    }
    for(int j=0; j<W+2, j++){
      cout << pic.at(i)(j);
    }
  cout << endl;
  }
  
  for(int i=0; i<W+2, i++){
    cout << '#';
  }
  cout << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before ')' token
    9 |   for(int i=0; i<W+2, i++){
      |                          ^
      |                          ;
a.cc:20:28: error: expected ';' before ')' token
   20 |     for(int j=0; j<W+2, j++){
      |                            ^
      |                            ;
a.cc:21:24: error: no match for call to '(__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type {aka std::vector<char>}) (int&)'
   21 |       cout << pic.at(i)(j);
      |               ~~~~~~~~~^~~
a.cc:26:26: error: expected ';' before ')' token
   26 |   for(int i=0; i<W+2, i++){
      |                          ^
      |                          ;
Language: C++

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

int main(){
  int H,W;
  cin >> H >> W;
  
  vector <vector<char>> pic(H+2, vector<char> (W+2)); 
  for(int i=0; i<W+2, i++){
    cout << '#';
  }
  cout << endl;
  
  for (int i=1; i<H+1; i++){
    pic.at(i).at(0) = '#';
    pic.at(i).at(W+1) = '#';
    for (int j=1; j<W+1; j++){
      cin >> pic.at(i).at(j);
    }
    for(int j=0; j<W+2, i++){
      cout << pic.at(i)(j);
    }
  cout << endl;
  }
  
  for(int i=0; i<W+2, i++){
    cout << '#';
  }
  cout << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected ';' before ')' token
    9 |   for(int i=0; i<W+2, i++){
      |                          ^
      |                          ;
a.cc:20:28: error: expected ';' before ')' token
   20 |     for(int j=0; j<W+2, i++){
      |                            ^
      |                            ;
a.cc:21:24: error: no match for call to '(__gnu_cxx::__alloc_traits<std::allocator<std::vector<char> >, std::vector<char> >::value_type {aka std::vector<char>}) (int&)'
   21 |       cout << pic.at(i)(j);
      |               ~~~~~~~~~^~~
a.cc:26:26: error: expected ';' before ')' token
   26 |   for(int i=0; i<W+2, i++){
      |                          ^
      |                          ;
Language: C++

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

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

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

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

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'manespace'
    2 | using manespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> H >> W;
      |   ^~~
      |   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:8:3: error: 'vector' was not declared in this scope
    8 |   vector <vector<char>> pic(H+2, vector<char> (W+2));
      |   ^~~~~~
a.cc:8:3: note: suggested alternatives:
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:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:8:18: error: expected primary-expression before 'char'
    8 |   vector <vector<char>> pic(H+2, vector<char> (W+2));
      |                  ^~~~
a.cc:9:3: error: 'pic' was not declared in this scope
    9 |   pic.at(0) = vector<char> (W+2,'#');
      |   ^~~
a.cc:9:22: error: expected primary-expression before 'char'
    9 |   pic.at(0) = vector<char> (W+2,'#');
      |                      ^~~~
a.cc:10:24: error: expected primary-expression before 'char'
   10 |   pic.at(H+1) = vector<char> (W+2,'#');
      |                        ^~~~
a.cc:11:18: error: expected ';' before '<' token
   11 |   for (int i=0, i<H+2, i++){
      |                  ^
      |                  ;
a.cc:11:18: error: expected primary-expression before '<' token
a.cc:11:27: error: expected ';' before ')' token
   11 |   for (int i=0, i<H+2, i++){
      |                           ^
      |                           ;
a.cc:14:20: error: expected ';' before '<' token
   14 |     for (int j=0, j<W, j++){
      |                    ^
      |                    ;
a.cc:14:20: error: expected primary-expression before '<' token
a.cc:14:27: error: expected ';' before ')' token
   14 |     for (int j=0, j<W, j++){
      |                           ^
      |                           ;
Language: C++

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

int main(){
  int H,W,i,j;
  char a;
  cin >> H >> W;
 
  for(i=0;i<W+2;++i){cout << "#";}
  cout << endl;
  for(j=0;j<H;++j){
    cout << "#";
  for(i=0;i<W;++i){
      cin >> a;
      cout << a;
    }
      cout << "#";
    }
    cout << endl;
  }
  for(i=0;i<W+2;++i){cout << "#";}
}
  cout << endl;
}
  

Compiler output:
a.cc:21:3: error: expected unqualified-id before 'for'
   21 |   for(i=0;i<W+2;++i){cout << "#";}
      |   ^~~
a.cc:21:11: error: 'i' does not name a type
   21 |   for(i=0;i<W+2;++i){cout << "#";}
      |           ^
a.cc:21:17: error: expected unqualified-id before '++' token
   21 |   for(i=0;i<W+2;++i){cout << "#";}
      |                 ^~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
a.cc:23:3: error: 'cout' does not name a type
   23 |   cout << endl;
      |   ^~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

int main(){
  int H,W,i,j;
  string a;
  cin >> H >>W;
 
  for(i=0;i<W+2;++i){cout << "#";}
  cout << endl;
  for(j=0;j<H;++j){
  for(i=0;i<W;++i){
    if(i=0){
      cout << "#";
      cin >> a;
      cout << a;
    }
    else if(i>0&&i<W-1){
      cout << a;
    }
    else {
      cin >> a;
      cout << a;
      cout << "#";
    }
    cout << endl;
  }
  for(i=0;i<W+2;++i){cout << "#";}
}

  

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

#include <stdio.h>
int main(void) {
  int h,w,i;
  char a[111];
  scanf("%d%d",&h,&w);
  for(i=0;i<=w+1;i++) {
    printf("#");
  }
  printf("\n");
  for(i=0;i<h;i++) {
    scanf("%s",a);
    printf("#%s#\n",s);
  }
  for(i=0;i<=w+1;i++) {
    printf("#");
  }
}

Compiler output:
main.c: In function 'main':
main.c:12:21: error: 's' undeclared (first use in this function)
   12 |     printf("#%s#\n",s);
      |                     ^
main.c:12:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <stdio.h>
int main(void) {
  int h,w,i;
  char a[111];
  scanf("%d%d",&h,&w);
  for(i=0;i<=w+1;i++) {
    printf("#");
  }
  printf("\n");
  for(i=0;i<h;i++) {
    scanf("%s",a);
    printf("#%s#\n",s);
  }
  for(i=0;i<=w+1;i++) {
    printf("#");
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 's' was not declared in this scope
   12 |     printf("#%s#\n",s);
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  
  int N,M;
  int i,j;
  cin >> N >> M;
  vector<int>vec1(M);
  for(i=0;i<M+2;++i){
    cout << "#" ;
  }
  for(j=0;j<N;++j){
  for(i=0;i<M;++i){
    cin >> vec1.at(i);
    if(i=0){
      cout << "#"vec1.at(i);
    }
    else if(0<i<M){
      cout << vec1.at(i);
    }
    else{
      cout <<vec1.at(i)"#"<<endl;
    }
  }
  }
  for(i=0;i<M+2;++i){
    cout << "#";
  }
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: unable to find string literal operator 'operator""vec1' with 'const char [2]', 'long unsigned int' arguments
   16 |       cout << "#"vec1.at(i);
      |               ^~~~~~~
a.cc:22:24: error: expected ';' before string constant
   22 |       cout <<vec1.at(i)"#"<<endl;
      |                        ^~~
      |                        ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  
  int N,M;
  int i,j
  cin >> N >> M;
  vector<int>vec1(M);
  for(i=0;i<M+2;++i){
    cout << "#" ;
  }
  for(j=0;j<N;++j){
  for(i=0;i<M;++i){
    cin >> vec1.at(i);
    if(i=0){
      cout << "#"vec1.at(i);
    }
    else if(0<i<M){
      cout << vec1.at(i);
    }
    else{
      cout <<vec1.at(i)"#"<<endl;
    }
  }
  }
  for(i=0;i<M+2;++i){
    cout << "#";
  }
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
    7 |   cin >> N >> M;
      |   ^~~
a.cc:12:7: error: 'j' was not declared in this scope
   12 |   for(j=0;j<N;++j){
      |       ^
a.cc:16:15: error: unable to find string literal operator 'operator""vec1' with 'const char [2]', 'long unsigned int' arguments
   16 |       cout << "#"vec1.at(i);
      |               ^~~~~~~
a.cc:22:24: error: expected ';' before string constant
   22 |       cout <<vec1.at(i)"#"<<endl;
      |                        ^~~
      |                        ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  
  int N,M;
  int i,j
  cin >> N >> M;
  vector<int>vec1(M);
  for(i=0;i<M+2;++i){
    cout << "#" ;
  }
  for(j=0;J<N;++j){
  for(i=0;i<M;++i){
    cin >> vec1.at(i);
    if(i=0){
      cout << "#"vec1.at(i);
    }
    else if(0<i<M){
      cout << vec1.at(i);
    }
    else{
      cout <<vec1.at(i)"#"<<endl;
    }
  }
  }
  for(i=0;i<M+2;++i){
    cout << "#";
  }
}

  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
    7 |   cin >> N >> M;
      |   ^~~
a.cc:12:7: error: 'j' was not declared in this scope
   12 |   for(j=0;J<N;++j){
      |       ^
a.cc:12:11: error: 'J' was not declared in this scope
   12 |   for(j=0;J<N;++j){
      |           ^
a.cc:16:15: error: unable to find string literal operator 'operator""vec1' with 'const char [2]', 'long unsigned int' arguments
   16 |       cout << "#"vec1.at(i);
      |               ^~~~~~~
a.cc:22:24: error: expected ';' before string constant
   22 |       cout <<vec1.at(i)"#"<<endl;
      |                        ^~~
      |                        ;