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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   13 |     cin >> pic(i);
      |            ~~~^~~
a.cc:14:23: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   14 |     cout << '#' << pic(i) << '#' << endl;
      |                    ~~~^~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected unqualified-id before '=' token
   10 |     char = a;
      |          ^
a.cc:11:22: error: expected ';' before '<=' token
   11 |     for (int i = 0, i <= W + 1; i++){
      |                      ^~~
      |                      ;
a.cc:11:23: error: expected primary-expression before '<=' token
   11 |     for (int i = 0, i <= W + 1; i++){
      |                       ^~
a.cc:18:20: error: 'a' was not declared in this scope
   18 |             cin >> a;
      |                    ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected unqualified-id before '=' token
   10 |     char = a
      |          ^
a.cc:11:33: error: 'i' was not declared in this scope
   11 |     for (int i = 0, i <= W + 1; i++){
      |                                 ^
a.cc:18:20: error: 'a' was not declared in this scope
   18 |             cin >> a;
      |                    ^
a.cc:23:22: error: expected ';' before '<=' token
   23 |     for (int i = 0, i <= W + 1; i++){
      |                      ^~~
      |                      ;
a.cc:23:23: error: expected primary-expression before '<=' token
   23 |     for (int i = 0, i <= W + 1; i++){
      |                       ^~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main() {
    int i,j;
    int H,W;
    
    cin >> H >> W;
    
    vector<char> a(H*W);
    
    //読み込み
    for(i=0;i<H*W;i++) cin >> a[i];
    
    for(i=0;i<W+2;i++) cout << '#';
    cout << endl;
    
    for(i=0;i<H;i++){
        cout << '#';
        for(j=0;j<W;j++) cout << a.at(j+H*i);
        cout << '#';
    }
    for(i=0;i<W+2;i++) cout << '#';
    
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: expected '}' at end of input
   27 |     return 0;
      |              ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C

#include<stdio.h>
int main(){
  int a, b, i, j;#include<stdio.h>
int main(){
  int a, b, i, j;
  char s[100][101];
  scanf("%d %d", &a, &b);
  for(i = 0; i < a; ++i){
    scanf("%s", s[i]);
  }
  for(i = 0; i < b + 2; ++i) printf("#");
  puts("");
  for(i = 0; i < a; ++i) printf("#%s#\n", s[i]);
  for(i = 0; i < b + 2; ++i) printf("#");
  puts("");
  return 0;
}
  char s[100][101];
  scanf("%d %d", &a, &b);
  for(i = 0; i < a; ++i){
    scanf("%s", s[i]);
  }
  for(i = 0; i < a + 2; ++i) printf("#");
  puts("");
  for(i = 0; i < a; ++i) printf("#%s#\n", s[i]);
  for(i = 0; i < a + 2; ++i) printf("#");
  puts("");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:18: error: stray '#' in program
    3 |   int a, b, i, j;#include<stdio.h>
      |                  ^
main.c:3:19: error: 'include' undeclared (first use in this function)
    3 |   int a, b, i, j;#include<stdio.h>
      |                   ^~~~~~~
main.c:3:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:27: error: 'stdio' undeclared (first use in this function); did you mean 'stdin'?
    3 |   int a, b, i, j;#include<stdio.h>
      |                           ^~~~~
      |                           stdin
main.c:4:1: error: expected expression before 'int'
    4 | int main(){
      | ^~~
main.c:21:17: error: 's' undeclared (first use in this function)
   21 |     scanf("%s", s[i]);
      |                 ^
Language: C++

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

int main() {
  int tate,yoko;
  cin >> tate >> yoko;
  
  vector<string> vec(tate);
  for ( int i = 0;  i < tate;  i++ ) {
    cin >> vec(i);
  }
  
  for ( int i = 0; i > yoko + 2; i++ ) {
    cout << "#";
  }
  cout << endl;
  
  
  for ( int i = 0; i > vec.size(); i++ ) {
    cout << "#" << vec.at(i) << "#" << endl;
  }
   

    for ( int i = 0; i > yoko + 2; i++ ) {
    cout << "#";
  }
  cout << endl;
}
  



Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   10 |     cin >> vec(i);
      |            ~~~^~~
Language: C++

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

int main(){
  int H,W;
  cin>>H>>W;
  char a[H+2][W+2]='#';
  
  for(int i=0;i<H;i++){
    for(int j=0;<W;j++){
      cin>>a[i+1][j+1];
    }
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: array must be initialized with a brace-enclosed initializer
    7 |   char a[H+2][W+2]='#';
      |                    ^~~
a.cc:10:17: error: expected primary-expression before '<' token
   10 |     for(int j=0;<W;j++){
      |                 ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: expected ';' before ')' token
   15 |   for(int i = 0;i < w + 2) {
      |                          ^
      |                          ;
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 ]);
  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:8:22: error: extended character ’ is not valid in an identifier
    8 |       b [ i ][ j ] = ’# ’;
      |                      ^
a.cc:8:23: error: stray '#' in program
    8 |       b [ i ][ j ] = ’# ’;
      |                       ^
a.cc:8:25: error: extended character ’ is not valid in an identifier
    8 |       b [ i ][ j ] = ’# ’;
      |                         ^
a.cc: In function 'int main()':
a.cc:3:15: error: 'cin' was not declared in this scope
    3 |   int H , W ; cin >> H >> W ;
      |               ^~~
a.cc:5:5: error: 'scanf' was not declared in this scope
    5 |     scanf ("% s " , a [ i ]);
      |     ^~~~~
a.cc:8:22: error: '\U00002019' was not declared in this scope
    8 |       b [ i ][ j ] = ’# ’;
      |                      ^
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout << b [ i ][ j ];
      |         ^~~~
a.cc:15:7: error: 'cout' was not declared in this scope
   15 |       cout << endl ;
      |       ^~~~
a.cc:15:15: error: 'endl' was not declared in this scope
   15 |       cout << endl ;
      |               ^~~~
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 += 1) {
    for(int j = 0; j < W; j += 1) {
      cin>>A.at(i).at(j);
    }
  }
  vector<vector<char>>B(H+2,vector<char>(W+2));
  for(int i = 0; i < H+2; i += 1) {
    for(int j = 0; j < W+2; j += 1) {
      B.at(i).at(j)=B.at(i).at(j).push_back("#");
    }
  }
  for(int i = 0; i < H; i += 1) {
    for(int j = 0; j < W; j += 1) {
      B.at(i+1).at(j+1)=A.at(i).at(j);
    }
  }
  for(int i = 0; i < H+2; i += 1) {
    for(int j = 0; j < W+2; j += 1) {
      cout<<B.at(i).at(j)<<endl;
    }
  }
}
  
  
      

Compiler output:
a.cc: In function 'int main()':
a.cc:16:35: error: request for member 'push_back' in '(& B.std::vector<std::vector<char> >::at(((std::vector<std::vector<char> >::size_type)i)))->std::vector<char>::at(((std::vector<char>::size_type)j))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   16 |       B.at(i).at(j)=B.at(i).at(j).push_back("#");
      |                                   ^~~~~~~~~
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 += 1) {
    for(int j = 0; j < W; j += 1) {
      cin>>A.at(i).at(j);
    }
  }
  vector<vector<char>>B(H+2,vector<char>(W+2));
  for(int i = 0; i < H+2; i += 1) {
    for(int j = 0; j < W+2; j += 1) {
      B.at(i).at(j)="#";
    }
  }
  for(int i = 0; i < H; i += 1) {
    for(int j = 0; j < W; j += 1) {
      B.at(i+1).at(j+1)=A.at(i).at(j);
    }
  }
  for(int i = 0; i < H+2; i += 1) {
    for(int j = 0; j < W+2; j += 1) {
      cout<<B.at(i).at(j)<<endl;
    }
  }
}
  
  
      

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   16 |       B.at(i).at(j)="#";
      |                     ^~~
      |                     |
      |                     const char*
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 += 1) {
    for(int j = 0; j < W; j += 1) {
      cin>>A.at(i).at(j);
    }
  }
  vector<vector<char>>B(H+2,vector<char>(W+2));
  for(int i = 0; i < H+2; i += 1) {
    for(int j = 0; j < W+2; j += 1) {
      B.at(i).at(j)="#";
    }
  }
  for(int i = 0; i < H; i += 1) {
    for(int j = 0; j < W; j += 1) {
      B.at(i+1)(j+1)=A.at(i).at(j);
    }
  }
  for(int i = 0; i < H+2; i += 1) {
    for(int j = 0; j < W+2; j += 1) {
      cout<<B.at(i).at(j)<<endl;
    }
  }
}
  
  
      

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   16 |       B.at(i).at(j)="#";
      |                     ^~~
      |                     |
      |                     const char*
a.cc:21:16: 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 |       B.at(i+1)(j+1)=A.at(i).at(j);
      |       ~~~~~~~~~^~~~~
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);
    }
  }
  for (int i=0; i<w+2; ++i) {
    cout << "#" << endl;
  }
  for (int i=0; i<H; ++i){
    for (int j=0; j<W; ++j){
      if (j == 0) {
        cout << "#" << vec.at(i).at(j);
      }else if (j == W-1){
        cout << vec.at(i).at(j) << "#";
      }else{
        cout << vec.at(i).at(j);
      }
    }
  }
  for (int i=0; i<w+2; ++i) {
    cout << "#" << endl;
  }
}


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

#include <bits/stdc++.h>

#define mod 1000000007

#define rep(i, n) for(int i=0; i<n; ++i)

using namespace std;
typedef long long ll;
const long long INF = 1LL << 60;
 
int main(void){
	
	int H, W;
	char a[110][110];
	
	cin >> H >> W;
	
	rep(i, H)
		rep(j, W)
			cin >> H[i][j];
	
	rep(i, H+2){
		rep(j, W+2){
			if(j == 0 || j == W+1 || i == 0 || i == H+1)
				cout << '#';
			else
				cout << a[i-1][j-1];
		}
		cout << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:33: error: invalid types 'int[int]' for array subscript
   20 |                         cin >> H[i][j];
      |                                 ^
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  vector<vector> Ah(H)
  for(int i = 0; i < H; i++)
    vector<char> Aw(W); // vector list of test scores  
    // add input to list 
    for (int j = 0; j < W; j++) {
      cin >> A.at(j);
    Ah.at(i) = Aw
  }
  

    cout << Ah << endl;
  }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
    7 |   vector<vector> Ah(H)
      |                ^
a.cc:7:16: note:   expected a type, got 'vector'
a.cc:7:16: error: template argument 2 is invalid
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for(int i = 0; i < H; i++)
      |   ^~~
a.cc:8:18: error: 'i' was not declared in this scope
    8 |   for(int i = 0; i < H; i++)
      |                  ^
a.cc:12:14: error: 'A' was not declared in this scope
   12 |       cin >> A.at(j);
      |              ^
a.cc:13:8: error: request for member 'at' in 'Ah', which is of non-class type 'int'
   13 |     Ah.at(i) = Aw
      |        ^~
a.cc:13:16: error: 'Aw' was not declared in this scope; did you mean 'Ah'?
   13 |     Ah.at(i) = Aw
      |                ^~
      |                Ah
a.cc: At global scope:
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

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

int main () {
  int H , W;
  string S;
  vector<char> A(W + 2, '#');
  for (int i = 0; i < W + 2) {
    cout << A.at(i);
  }
  cout << endl;
  for (int i = 0; i < H + 2) {
    vector<char> A(W + 2, '#');
    cin >> S;
    for (int j = 0; j < W + 2) {
      if (j == 0 || j == W + 1) {
      }
      else {
        A.at(i) = S.at(j - 1);
      }
    }
    for (int i = 0; i < W + 2) {
    cout << A.at(i);
    }
    cout << endl;
  }
  vector<char> A(W + 2, '#');
  for (int i = 0; i < W + 2) {
    cout << A.at(i);
  }
}
  

  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: expected ';' before ')' token
    8 |   for (int i = 0; i < W + 2) {
      |                            ^
      |                            ;
a.cc:12:28: error: expected ';' before ')' token
   12 |   for (int i = 0; i < H + 2) {
      |                            ^
      |                            ;
a.cc:15:30: error: expected ';' before ')' token
   15 |     for (int j = 0; j < W + 2) {
      |                              ^
      |                              ;
a.cc:22:30: error: expected ';' before ')' token
   22 |     for (int i = 0; i < W + 2) {
      |                              ^
      |                              ;
a.cc:27:16: error: redeclaration of 'std::vector<char> A'
   27 |   vector<char> A(W + 2, '#');
      |                ^
a.cc:7:16: note: 'std::vector<char> A' previously declared here
    7 |   vector<char> A(W + 2, '#');
      |                ^
a.cc:28:28: error: expected ';' before ')' token
   28 |   for (int i = 0; i < W + 2) {
      |                            ^
      |                            ;
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: 'vec' was not declared in this scope
   18 |         cout << vec.at(i);
      |                 ^~~
a.cc:21:4: error: expected '}' at end of input
   21 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: 'Si' was not declared in this scope; did you mean 'i'?
   15 |     cout << "##" << Si << "##" << endl;
      |                     ^~
      |                     i
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: 'Si' was not declared in this scope; did you mean 'i'?
   15 |     cout << "##" << Si << endl;
      |                     ^~
      |                     i
Language: C++

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

int main(){
  int s,w;
  cin >>s>>w;
  vector<string> vec(s);
  for (int i=0;i<s;i++){
    cin >>vec.at(i);
    vec.at(i) = "#" + vec.at(i) +"#";
  }
  for (int i=;i<w+2;i++){
    cout <<"#";
  }
  cout << endl;
  for (int i =0;i<s;i++){
    cout <<vec.at(i)<<endl;
  }
  for (int i=;i<w+2;i++){
    cout <<"#";
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected primary-expression before ';' token
   12 |   for (int i=;i<w+2;i++){
      |              ^
a.cc:19:14: error: expected primary-expression before ';' token
   19 |   for (int i=;i<w+2;i++){
      |              ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'sting' was not declared in this scope
   11 |                 sting tmp;
      |                 ^~~~~
a.cc:12:24: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   12 |                 cin >> tmp;
      |                        ^~~
      |                        tm
Language: C++

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

int main(){
  int W,H; cin >> W >> H;
  
  string moj;
  for(int i=0;i<H;i++){
    cin >> moj.at(i);
  }
  for(int i=0;i<W+2;i++){
    cout << "#" << endl;
  }
  for(int i=0;i<H;i++){
    cout << "#" << moj.at(i) << "#\n" << endl;
  }
  for(int i=0;i<W+2;i++){
    cout << "#" << eendl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: 'eendl' was not declared in this scope
   18 |     cout << "#" << eendl;
      |                    ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin>>H>>W;
  vector<char> str(H*W);
  for(int i=0;i<H*W;i++)cin>>str(i);
  for(int i=0;i<W+2;i++)cout<<"#";
  cout<<"_n";
  for(int i=0;i<H;i++){
    cout<<"#";
    for(int j=0;j<W;j++)cout<<str(i*W+j);
    cout<<"#\n";
  }
  for(int i=0;i<W+2;i++)cout<<"#";
  cout<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: no match for call to '(std::vector<char>) (int&)'
    8 |   for(int i=0;i<H*W;i++)cin>>str(i);
      |                              ~~~^~~
a.cc:13:34: error: no match for call to '(std::vector<char>) (int)'
   13 |     for(int j=0;j<W;j++)cout<<str(i*W+j);
      |                               ~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin>>H>>W;
  vector<char> str(H*W);
  for(int i=0;i<H*W;i++)cin>>str(i);
  for(int i=0;i<W+2;i++)cout<<"#";
  cout<<"_n";
  for(int i=0;i<H;i++){
    cout<<"#";
    for(int j=0;j<W;j++)cout<<str(i*H+j);
    cout<<"#\n";
  }
  for(int i=0;i<W+2;i++)cout<<"#";
  cout<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: no match for call to '(std::vector<char>) (int&)'
    8 |   for(int i=0;i<H*W;i++)cin>>str(i);
      |                              ~~~^~~
a.cc:13:34: error: no match for call to '(std::vector<char>) (int)'
   13 |     for(int j=0;j<W;j++)cout<<str(i*H+j);
      |                               ~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin>>H>>W;
  vector<string> str(H*W);
  for(int i=0;i<HW;i++)cin>>str(i);
  for(int i=0;i<W+2;i++)cout<<"#";
  cout<<"_n";
  for(int i=0;i<H;i++){
    cout<<"#";
    for(int j=0;j<W;j++)cout<<str(i*H+j);
    cout<<"#\n";
  }
  for(int i=0;i<W+2;i++)cout<<"#";
  cout<<"_n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'HW' was not declared in this scope; did you mean 'W'?
    8 |   for(int i=0;i<HW;i++)cin>>str(i);
      |                 ^~
      |                 W
a.cc:8:32: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
    8 |   for(int i=0;i<HW;i++)cin>>str(i);
      |                             ~~~^~~
a.cc:13:34: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int)'
   13 |     for(int j=0;j<W;j++)cout<<str(i*H+j);
      |                               ~~~^~~~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'str' was not declared in this scope; did you mean 'std'?
   13 |     cin >> str;
      |            ^~~
      |            std
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |   for (i = 0; i < W + 2; i++) {
      |        ^
a.cc:12:8: error: 'i' was not declared in this scope
   12 |   for (i = 0; i < H; i++) {
      |        ^
a.cc:13:12: error: 'str' was not declared in this scope; did you mean 'std'?
   13 |     cin >> str;
      |            ^~~
      |            std
a.cc:16:8: error: 'i' was not declared in this scope
   16 |   for (i = 0; i < W + 2; i++) {
      |        ^
Language: C++

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

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

}


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

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'w' was not declared in this scope
    7 |   cin >> H >> w;
      |               ^
a.cc:11:14: error: expected initializer before '<' token
   11 |   while(int k<W+2){
      |              ^
a.cc:11:14: error: expected ')' before '<' token
   11 |   while(int k<W+2){
      |        ~     ^
      |              )
a.cc:11:14: error: expected primary-expression before '<' token
a.cc:20:27: error: expected ';' before ')' token
   20 |     for (j = 0; j < W, j++) {
      |                           ^
      |                           ;
a.cc:29:14: error: expected initializer before '<' token
   29 |   while(int k<W+2){
      |              ^
a.cc:29:14: error: expected ')' before '<' token
   29 |   while(int k<W+2){
      |        ~     ^
      |              )
a.cc:29:14: error: expected primary-expression before '<' token
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: expected '}' at end of input
   21 |   cout << endl;
      |                ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>

#include <string>

#include <vector>
using namespace std;
int main()
{

   int h,w;
   cin>>h>>w;
   string s;
   vector<string>res;
   for(int i=0;i<h;i++){
    cin>>s;
    res.push_back(s);
   }
   s.clear();
   for(int i=0;i<w+2;i++)
   {
       s+='#';
   }
   cout<<s<<endl;
   for(auto &x :res)
   {
       cout<<"#";
       cout<<x;
       cout<<"#"<<endl;
   }
   cout<<s<<endl;


    return 0;
}
#include <iostream>

#include <string>

#include <vector>
using namespace std;
int main()
{

   int h,w;
   cin>>h>>w;
   string s;
   vector<string>res;
   for(int i=0;i<h;i++){
    cin>>s;
    res.push_back(s);
   }
   s.clear();
   for(int i=0;i<w+2;i++)
   {
       s+='#';
   }
   cout<<s<<endl;
   for(auto &x :res)
   {
       cout<<"#";
       cout<<x;
       cout<<"#"<<endl;
   }
   cout<<s<<endl;


    return 0;
}


Compiler output:
a.cc:41:5: error: redefinition of 'int main()'
   41 | int main()
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main()
      |     ^~~~
Language: C++

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

int main() {
  int H,W;
  cin >> H>> W;
 
  // N要素の配列
  vector<int> A;
 
  // 入力処理
  for (int i = 0; i < W+2; i++) {
    cout << #;
  }
  cout << "" <<endl;
  for (int i = 0; i < H; i++) {
    cout << #;
  for (int j = 0; j < W; j++) {
    cin >> A.at(j);
    cout << A.at(j);
  }
    cout << #<<endl;
  }
    for (int i = 0; i < W+2; i++) {
    cout << #;
  }
  cout << "" <<endl;
}

Compiler output:
a.cc:13:13: error: stray '#' in program
   13 |     cout << #;
      |             ^
a.cc:17:13: error: stray '#' in program
   17 |     cout << #;
      |             ^
a.cc:22:13: error: stray '#' in program
   22 |     cout << #<<endl;
      |             ^
a.cc:25:13: error: stray '#' in program
   25 |     cout << #;
      |             ^
a.cc: In function 'int main()':
a.cc:13:14: error: expected primary-expression before ';' token
   13 |     cout << #;
      |              ^
a.cc:17:14: error: expected primary-expression before ';' token
   17 |     cout << #;
      |              ^
a.cc:22:14: error: expected primary-expression before '<<' token
   22 |     cout << #<<endl;
      |              ^~
a.cc:25:14: error: expected primary-expression before ';' token
   25 |     cout << #;
      |              ^
Language: C++

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


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

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

Compiler output:
a.cc:15:28: error: stray '#' in program
   15 |     vector<string> vec(W+1,#);
      |                            ^
a.cc: In function 'int main()':
a.cc:13:7: error: 'i' was not declared in this scope
   13 |   for(i = 0 ; i < H ; i++){
      |       ^
a.cc:15:29: error: expected primary-expression before ')' token
   15 |     vector<string> vec(W+1,#);
      |                             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){
  int h,w;
  cin>>h>>w;
  char a[h+h][w+w];
  rep(i,h){
    rep(j,w){
      cin>>[i+1][j+1];
    }
  }
  rep(i,w+2)a[0][i]='#';
  rep(i,w+2)a[h+1][i]='#';
  rep(i,h+2)a[i][0]='#';
  rep(i,h+2)a[i][w+1]='#';
  rep(i,h+2){
    rep(j,w+2){
      cout<<a[i][j];
    }
    cout<<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: expected ',' before '+' token
   19 |       cin>>[i+1][j+1];
      |              ^
      |              ,
a.cc:19:14: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:19:17: error: expected '{' before '[' token
   19 |       cin>>[i+1][j+1];
      |                 ^
a.cc: In function 'int main()':
a.cc:19:17: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int')
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){
  char a[h][w];
  rep(i,h){
    rep(j,w){
      cin>>[i+1][j+1];
    }
  }
  rep(i,w+2)a[0][i]='#';
  rep(i,w+2)a[h+1][i]='#';
  rep(i,h+2)a[i][0]='#';
  rep(i,h+2)a[i][w+1]='#';
  rep(i,h+2){
    rep(j,w+2){
      cout<<a[i][j];
    }
    cout<<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: 'h' was not declared in this scope
   14 |   char a[h][w];
      |          ^
a.cc:14:13: error: 'w' was not declared in this scope
   14 |   char a[h][w];
      |             ^
a.cc:17:14: error: expected ',' before '+' token
   17 |       cin>>[i+1][j+1];
      |              ^
      |              ,
a.cc:17:14: error: expected identifier before '+' token
a.cc: In lambda function:
a.cc:17:17: error: expected '{' before '[' token
   17 |       cin>>[i+1][j+1];
      |                 ^
a.cc: In function 'int main()':
a.cc:17:17: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int')
a.cc:20:13: error: 'a' was not declared in this scope
   20 |   rep(i,w+2)a[0][i]='#';
      |             ^
a.cc:21:13: error: 'a' was not declared in this scope
   21 |   rep(i,w+2)a[h+1][i]='#';
      |             ^
a.cc:22:13: error: 'a' was not declared in this scope
   22 |   rep(i,h+2)a[i][0]='#';
      |             ^
a.cc:23:13: error: 'a' was not declared in this scope
   23 |   rep(i,h+2)a[i][w+1]='#';
      |             ^
a.cc:26:13: error: 'a' was not declared in this scope
   26 |       cout<<a[i][j];
      |             ^
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  vector<string> pic(H + 2);
  pic.at(0) = "#" * (W + 2);
  pic.at(H +1) = "#" * (W + 2);
  for (int i = 1; i < H + 1; i++){
    string S;
    cin >> S;
    pic.at(i) = "#" + S + "#";
  }
  for (int i = 0, i < H + 2, i++){
    cout << pic.at(i) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
    8 |   pic.at(0) = "#" * (W + 2);
      |               ~~~ ^ ~~~~~~~
      |               |        |
      |               |        int
      |               const char [2]
a.cc:9:22: error: invalid operands of types 'const char [2]' and 'int' to binary 'operator*'
    9 |   pic.at(H +1) = "#" * (W + 2);
      |                  ~~~ ^ ~~~~~~~
      |                  |        |
      |                  |        int
      |                  const char [2]
a.cc:15:20: error: expected ';' before '<' token
   15 |   for (int i = 0, i < H + 2, i++){
      |                    ^~
      |                    ;
a.cc:15:21: error: expected primary-expression before '<' token
   15 |   for (int i = 0, i < H + 2, i++){
      |                     ^
a.cc:15:33: error: expected ';' before ')' token
   15 |   for (int i = 0, i < H + 2, i++){
      |                                 ^
      |                                 ;
Language: C++

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

int main() {
  int h,w;
  string sub;
  cin >> h >> w;
  vector<string> a(h+2,#);
  for(int i = 1; i < w + 2; i++){
    a.at(0) += "#";
  }
  for(int i = 1; i < h + 1; i++){
    cin >> sub;
    a.at(i) += sub + "#";
  }
  a.at(h + 1) = a.at(0);
  for(int i = 0; i < h + 2; i++){
    cout << a.at(i) << endl;
  }
}


Compiler output:
a.cc:8:24: error: stray '#' in program
    8 |   vector<string> a(h+2,#);
      |                        ^
a.cc: In function 'int main()':
a.cc:8:25: error: expected primary-expression before ')' token
    8 |   vector<string> a(h+2,#);
      |                         ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:9:39: error: 's' undeclared (first use in this function)
    9 |   for(int i=0;i<h;i++)printf("#%s#\n",s[i]);
      |                                       ^
main.c:9:39: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'W' was not declared in this scope
    7 |   for(int j=0;j<W+2;j++)p.at(j)='#';
      |                 ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: missing template arguments before '(' token
    5 |   vector(string) s(h);
      |         ^
a.cc:5:16: error: expected primary-expression before ')' token
    5 |   vector(string) s(h);
      |                ^
a.cc:6:28: error: 's' was not declared in this scope
    6 |   for(int i=0;i<h;i++)cin>>s.at(i);
      |                            ^
a.cc:7:17: error: 'W' was not declared in this scope
    7 |   for(int j=0;j<W+2;j++)p.at(j)='#';
      |                 ^
a.cc:9:34: error: 's' was not declared in this scope
    9 |   for(int k=0;k<h;k++)cout<<"#"<<s.at(k)<<"#"<<endl;
      |                                  ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int h,w
  cin << h << w << 
  vector<int> vec(h);
  for(int i=0;i<h,i++){
	cin << vec.at(i) 
  }
  /* 真ん中に入れるにはどうするか？ 画像があって、その周囲を#で囲む様子
  つまり、列はw+2で、行もh+2となる
  headerとfooterを意識して要素を分け、文字列の前後を#で囲む
  for{int i=0;i<w+2;i++){
    cout << "#"
  }
  cout << endl;
  
  真ん中
  for(int i=0;i<h;i++){
  cout << "#" << vec.at(i) << "#" << endl;
  }
  footer
    for{int i=0;i<w+2;i++){
    cout << "#"
  }
  cout << endl;
  */
  

  
                
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin << h << w <<
      |   ^~~
a.cc:8:22: error: expected ';' before ')' token
    8 |   for(int i=0;i<h,i++){
      |                      ^
      |                      ;
a.cc:9:16: error: 'vec' was not declared in this scope
    9 |         cin << vec.at(i)
      |                ^~~
Language: C++

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

int main() {
  int h, w;
  
  string a;
  
  for (int i = 0; i < w; i++) {
    cout << *;
  }
  cout << endl;
  
  for (int i = 0; i < h; i++) {
    cin >> a;
    cout << * << a << * << endl;
  }
  
  for (int i = 0; i < w; i++) {
    cout << *;
  }
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected primary-expression before ';' token
   10 |     cout << *;
      |              ^
a.cc:16:15: error: expected primary-expression before '<<' token
   16 |     cout << * << a << * << endl;
      |               ^~
a.cc:16:25: error: expected primary-expression before '<<' token
   16 |     cout << * << a << * << endl;
      |                         ^~
a.cc:20:14: error: expected primary-expression before ';' token
   20 |     cout << *;
      |              ^
Language: Java


public class Main {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		StringBuilder sb = new StringBuilder("");
		int h = s.nextInt();
		int w = s.nextInt();
		int i = 0;
		String a = "";
		String b = "";

		String ary[] = new String[h];
		for (i = 0; i < h; i++) {
			ary[i] = "#" + s.next() + "#";

		}
		String ary1[] = new String[w + 2];

		for (i = 0; i < w + 2; i++) {
			ary1[i] = "#";

			a = a + ary1[i];

		}
		System.out.println(a);
		for (i = 0; i < h; i++) {
			System.out.println(ary[i]);
		}
		System.out.println(a);

	}

}

Compiler output:
Main.java:5: error: cannot find symbol
		Scanner s = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		Scanner s = new Scanner(System.in);
		                ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected primary-expression before ';' token
   10 |     cout << "#" <<;
      |                   ^
a.cc:16:19: error: expected primary-expression before ';' token
   16 |     cout << "#" <<;
      |                   ^
a.cc:19:19: error: expected primary-expression before ';' token
   19 |       cout << a <<;
      |                   ^
a.cc:25:19: error: expected primary-expression before ';' token
   25 |     cout << "#" <<;
      |                   ^
Language: C++

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

int main () {
  int H, W;
  cin >> H >> W;
  string a;
  
  for (int i = 0; i < W + 1; i++){
    cout << "#" <<;
  }
  
  cout << "#" << endl;
  
  for (int i = 0; i < H; i++){
    cou << "#" <<;
    for (int i = 0; i < W; i++){
      cin >> a;
      cout << a <<;
    }
    cout << "#" << endl;
  }
  
  for (int i = 0; i < W + 1; i++){
    cout << "#" <<;
  }
  
  cout << "#" << endl;      
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected primary-expression before ';' token
   10 |     cout << "#" <<;
      |                   ^
a.cc:16:5: error: 'cou' was not declared in this scope; did you mean 'cos'?
   16 |     cou << "#" <<;
      |     ^~~
      |     cos
a.cc:16:18: error: expected primary-expression before ';' token
   16 |     cou << "#" <<;
      |                  ^
a.cc:19:19: error: expected primary-expression before ';' token
   19 |       cout << a <<;
      |                   ^
a.cc:25:19: error: expected primary-expression before ';' token
   25 |     cout << "#" <<;
      |                   ^
Language: C++

#include <iostream>
using namespace std;
int main() {
  int h,w; cin >> h >>w;
  for (int a=0;a<w+2;a++) {
    cout << "#";
  }
  cout << endl;
  for (int i=0;i<h;i++) {
    string s; cin >> s;
    cout << "#" << s << "#" << endl;
  }
  for (int a=0;a<w+2;b++) {
    cout << "#"
  }
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: 'b' was not declared in this scope
   13 |   for (int a=0;a<w+2;b++) {
      |                      ^
a.cc:14:16: error: expected ';' before '}' token
   14 |     cout << "#"
      |                ^
      |                ;
   15 |   }
      |   ~
Language: C++

#include <iostream>
using namespace std;
int main() {
  int h,w; cin >> h >>w;
  for (int a=0;a<w+2;i++) {
    cout << "#";
  }
  cout << endl;
  for (int i=0;i<h;i++) {
    string s; cin >> s;
    cout << "#" << s << "#" << endl;
  }
  for (int a=0;a<w+2;i++) {
    cout << "#"
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:22: error: 'i' was not declared in this scope
    5 |   for (int a=0;a<w+2;i++) {
      |                      ^
a.cc:13:22: error: 'i' was not declared in this scope
   13 |   for (int a=0;a<w+2;i++) {
      |                      ^
a.cc:14:16: error: expected ';' before '}' token
   14 |     cout << "#"
      |                ^
      |                ;
   15 |   }
      |   ~
Language: C++

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

int main(){
  int h,w; cin>>h >>w;
  vector<vector<char>> s(h+2,vector<char>(w+2));
  for(int i=0;i<h+2;i++){
    for(int j=0;j<w+2;j++){
      s[i][j]='#';
    }
  }
  for(int i=1;i<h+1;i++){
    for(int j=1;j<w+1;j++){
      int a;cin>>a;
      s[i][j]=a;
    }
  }
  for(int i=0;i<h+2;i++){
    for(j=0;j<w+2;j++){
      cout<<s[i][j]<<endl;
    }
  }
}

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

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

int main(){
  int h,w; cin>>h >>w;
  vector<vector<char>> s(h+2,vector<char>(w+2,'#'));
  for(int i=1;i<h+1;i++){
    for(int j=1;j<w+1;j++){
      cin>>s[i][j];
    }
  }
  for(int i=1;i<h+1;i++){
    for(int j=1;j<w+1;j++){
      cout<<s[i][j]
    }
    endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected ';' before '}' token
   14 |       cout<<s[i][j]
      |                    ^
      |                    ;
   15 |     }
      |     ~               
a.cc:16:9: error: statement cannot resolve address of overloaded function
   16 |     endl;
      |         ^
a.cc:17:4: error: expected '}' at end of input
   17 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
  int h,w; cin>>h >>w;
  vector<vector<char>> a(h+2,vector<char>(w+2,'#'));
  for(int i=1;i<h+1;i++){
    for(int j=1;j<w+1;j++){
      cin>>s[i][j];
    }
  }
  for(int i=1;i<h+1;i++){
    for(int j=1;j<w+1;j++){
      cout<<s[i][j]
    }
    endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 's' was not declared in this scope
    9 |       cin>>s[i][j];
      |            ^
a.cc:14:13: error: 's' was not declared in this scope
   14 |       cout<<s[i][j]
      |             ^
a.cc:16:9: error: statement cannot resolve address of overloaded function
   16 |     endl;
      |         ^
a.cc:17:4: error: expected '}' at end of input
   17 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

import Foundation

extension String {
    var argi: [Int] { return self.characters.split(" ").map { Int(String($0))! } }
}

let arr = readLine()!.argi

let h: Int = arr[0]
var w: Int = arr[1]

w += 2

var res: String = ""

for i in 0..<w {
    res += "#"
}
res += "\n"

for i in 0..<h {
    let input = readLine()
    res += "#" + input! + "#\n"
}

for i in 0..<w {
    res += "#"
}
res += "\n"

print(res)


Compiler output:
a.cc:16:10: error: too many decimal points in number
   16 | for i in 0..<w {
      |          ^~~
a.cc:21:10: error: too many decimal points in number
   21 | for i in 0..<h {
      |          ^~~
a.cc:26:10: error: too many decimal points in number
   26 | for i in 0..<w {
      |          ^~~
a.cc:1:1: error: 'import' does not name a type
    1 | import Foundation
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'let' does not name a type
    7 | let arr = readLine()!.argi
      | ^~~
a.cc:19:1: error: 'res' does not name a type
   19 | res += "\n"
      | ^~~
a.cc:26:1: error: expected unqualified-id before 'for'
   26 | for i in 0..<w {
      | ^~~
a.cc:29:1: error: 'res' does not name a type
   29 | res += "\n"
      | ^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a,b,i;
  vector<char> c[10000];
  cin>>a>>b;
  for(i=0;i<a*b;i++) cin>>c[i];
  for(i=0;i<b+2;i++) cout<<"#";
  cout<<endl;
  
  for(i=0;i<a;i++){
    cout<<"#";
    for(int j=i*b;j<i*b+b;j++){
      cout<<c[j];
    }
    cout<<"#"<<endl;
  }
  
  return 0;
}

    
    
  
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<char> c[10000];
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:10: error: expected primary-expression before 'char'
    6 |   vector<char> c[10000];
      |          ^~~~
a.cc:8:27: error: 'c' was not declared in this scope
    8 |   for(i=0;i<a*b;i++) cin>>c[i];
      |                           ^
a.cc:15:13: error: 'c' was not declared in this scope
   15 |       cout<<c[j];
      |             ^