criyle/codenet-compile-errors huggingface dataset:
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:11: error: extended character ’ is not valid in an identifier
    8 | b[i][j] = ’#’;
      |           ^
a.cc:8:12: error: stray '#' in program
    8 | b[i][j] = ’#’;
      |            ^
a.cc:8:13: error: extended character ’ is not valid in an identifier
    8 | 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:8:11: error: '\U00002019' was not declared in this scope
    8 | b[i][j] = ’#’;
      |           ^
a.cc:14:1: error: 'cout' was not declared in this scope
   14 | cout << b[i][j];
      | ^~~~
a.cc:15:1: error: 'cout' was not declared in this scope
   15 | cout << endl;
      | ^~~~
a.cc:15:9: error: 'endl' was not declared in this scope
   15 | cout << endl;
      |         ^~~~
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;

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<<"#";
  }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  int b;
  int i,j;
  
  
  // 変数aで入力を受け取る

  cout << endl;
  cin >> a >> b;
  for(i=0;i<b+2;i++){
    cout << "#";
  }
  vector <char> vec(b);
  for(j=0;j<a;j++){
  for (i=0;i<b;i++){
    cin >> vec.at(i);
  }
  cout<<"#";
  for(i=0;i<b;i++){
  cout << vec.at(i) 
  }
  cout<< "#"<< endl;
  }
  for(i=0;i<b+2;i++){
    cout << "#";
  }
  cout << endl;
  
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: expected ';' before '}' token
   24 |   cout << vec.at(i)
      |                    ^
      |                    ;
   25 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a;
  int b;
  int i,j;
  
  
  // 変数aで入力を受け取る

  cout << endl;
  cin >> a >> b;
  for(i=0;i<b+2;i++){
    cout << "#";
  }
  vector <char> vec(b);
  for(j=0;j<a;j++){
  for (i=0;i<b;i++){
    cin >> vec.at(i);
  }
  cout<<"#"
  for(i=0;i<b;i++){
  cout << vec.at(i) 
  }
  cout<< "#"<< endl;
  }
  for(i=0;i<b+2;i++){
    cout << "#";
  }
  cout << endl;
  
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: expected ';' before 'for'
   22 |   cout<<"#"
      |            ^
      |            ;
   23 |   for(i=0;i<b;i++){
      |   ~~~       
a.cc:23:18: error: expected ';' before ')' token
   23 |   for(i=0;i<b;i++){
      |                  ^
      |                  ;
Language: C

#include <stdio.h>
#include <string.h>

int main(void) {

    int h, w;
    scanf("%d %d", &h, &w);
    char s[101];

    char a[h][101];
    for (int i = 0; i < h; i++) {
        scanf("%s", s);
        strcpy(arr[i], s);
    }


    for (int i = 0; i < w + 2; i++) {
        printf("%c", '#');
    }
    printf("\n");
    for (int j = 0; j < h; j++) {
        printf("#%s#\n", arr[j]);
    }
    for (int i = 0; i < w + 2; i++) {
        printf("%c", '#');
    }

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:16: error: 'arr' undeclared (first use in this function)
   13 |         strcpy(arr[i], s);
      |                ^~~
main.c:13:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
  int W,H;
  cin >> W >> H;
  
  vector<vector<char>> p();
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> p.at(i).at(j);
    }      
  }
  //cout << p << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    9 |   vector<vector<char>> p();
      |                         ^~
a.cc:12:16: error: request for member 'at' in 'p', which is of non-class type 'std::vector<std::vector<char> >()'
   12 |       cin >> p.at(i).at(j);
      |                ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: template argument 1 is invalid
    9 |   vector<vector<int> p();
      |                        ^
a.cc:9:24: error: template argument 2 is invalid
a.cc:12:14: error: 'p' was not declared in this scope
   12 |       cin >> p.at(i)(j);
      |              ^
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected unqualified-id before ';' token
    5 |   int H, W,;
      |            ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'x' was not declared in this scope
   13 |   cout <<  "#" << x << "#"  << endl;
      |                   ^
Language: C++

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

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


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

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

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

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

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

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

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

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

int main() {
  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]
for (int i = 0; i < H + 2; i++) for (int j = 0; j < W +
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:6:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    6 | int main() {
      |         ^~
a.cc:6:9: note: remove parentheses to default-initialize a variable
    6 | int main() {
      |         ^~
      |         --
a.cc:6:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:6:12: error: a function-definition is not allowed here before '{' token
    6 | int main() {
      |            ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
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 a[i][j],b[i][j];
  
  for(int i=0;i<H;i++)
    for(int j=0;j<W;j++) cin >> a[i][j];
  
  for(int i=0;i<H+2;i++)
    for(int j=0;j<W+2;j++) b[i][j] = '#';
  
  for(int i=0;j<H;i++)
    for(int j=0;j<H;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: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |   int a[i][j],b[i][j];
      |         ^
a.cc:8:12: error: 'j' was not declared in this scope
    8 |   int a[i][j],b[i][j];
      |            ^
a.cc:11:33: error: 'a' was not declared in this scope
   11 |     for(int j=0;j<W;j++) cin >> a[i][j];
      |                                 ^
a.cc:14:28: error: 'b' was not declared in this scope
   14 |     for(int j=0;j<W+2;j++) b[i][j] = '#';
      |                            ^
a.cc:17:26: error: 'b' was not declared in this scope
   17 |     for(int j=0;j<H;j++) b[i+1][j+1] = a[i][j];
      |                          ^
a.cc:17:40: error: 'a' was not declared in this scope
   17 |     for(int j=0;j<H;j++) b[i+1][j+1] = a[i][j];
      |                                        ^
a.cc:22:15: error: 'b' was not declared in this scope
   22 |       cout << b[i][j];
      |               ^
Language: C++

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

int main() {
  int H,W; 
  cin >> H >> W;
  
  for(int i=0;i<H;i++)
    for(int j=0;j<W;j++) cin >> a[i][j];
  
  for(int i=0;i<H+2;i++)
    for(int j=0;j<W+2;j++) b[i][j] = '#';
  
  for(int i=0;j<H;i++)
    for(int j=0;j<H;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: In function 'int main()':
a.cc:9:33: error: 'a' was not declared in this scope
    9 |     for(int j=0;j<W;j++) cin >> a[i][j];
      |                                 ^
a.cc:12:28: error: 'b' was not declared in this scope
   12 |     for(int j=0;j<W+2;j++) b[i][j] = '#';
      |                            ^
a.cc:14:15: error: 'j' was not declared in this scope
   14 |   for(int i=0;j<H;i++)
      |               ^
a.cc:15:26: error: 'b' was not declared in this scope
   15 |     for(int j=0;j<H;j++) b[i+1][j+1] = a[i][j];
      |                          ^
a.cc:15:40: error: 'a' was not declared in this scope
   15 |     for(int j=0;j<H;j++) b[i+1][j+1] = a[i][j];
      |                                        ^
a.cc:20:15: error: 'b' was not declared in this scope
   20 |       cout << b[i][j];
      |               ^
Language: C++

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

int main() {
  int h, w;
  int string a, b;
  
  cin >> h >> w >> a >> b;
  
  rep(i, w + 2)
    cout << "#";
  cout << endl << "#" << a << "#" << endl << "#" << b << "#" << endl;
  
  rep(i, w + 2)
    cout << "#";
  cout << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: expected initializer before 'a'
    7 |   int string a, b;
      |              ^
a.cc:9:20: error: 'a' was not declared in this scope
    9 |   cin >> h >> w >> a >> b;
      |                    ^
a.cc:9:25: error: 'b' was not declared in this scope
    9 |   cin >> h >> w >> a >> b;
      |                         ^
Language: C++

v#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<char> pic(W);
     for(int i=0; i<W; i++){
      cin >> pic. at(i);
      cout << pic. at(i);
    }
    cout << "#" << endl;
  }
    for(int i=0; i<W+2; i++)
    cout << "#";
  cout << endl;
 }

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> H >> W;
      |   ^~~
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << "#";
      |     ^~~~
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout << endl;
      |   ^~~~
a.cc:10:11: error: 'endl' was not declared in this scope
   10 |   cout << endl;
      |           ^~~~
a.cc:14:5: error: 'vector' was not declared in this scope
   14 |     vector<char> pic(W);
      |     ^~~~~~
a.cc:14:12: error: expected primary-expression before 'char'
   14 |     vector<char> pic(W);
      |            ^~~~
a.cc:16:14: error: 'pic' was not declared in this scope
   16 |       cin >> pic. at(i);
      |              ^~~
Language: C++

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

int main() {
    int i, j;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:59: error: expected ')' before ';' token
   17 |     vector<vector<char>> b(h + 2, vector<char>(w + 2, '#');
      |                           ~                               ^
      |                                                           )
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: redeclaration of 'std::string s'
   16 |   string s(w + 2, '#'); cout << s << endl;
      |          ^
a.cc:8:10: note: 'std::string s' previously declared here
    8 |   string s(w + 2, '#'); cout << s << endl;
      |          ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int, char)'
    9 |   s = s(w + 2, '#'); cout << s << endl;
      |       ~^~~~~~~~~~~~
a.cc:19:8: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int, char)'
   19 |   s = s(w + 2, '#'); cout << s << endl;
      |       ~^~~~~~~~~~~~
Language: C++

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

int main(){
  int h, w;
  cin >> h >> w;
  vector<string> i_str;
  string top_last_str = str(w, '#');
  i_str.at(0) = top_last_str;
  for (int i = 0; i < h; ++i){
    string temp;
    cin >> temp;
    temp = "#" + temp + "#";
    i_str.at(i+1) = temp; 
  }
  i_str.at(h + 1) = top_last_str;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   string top_last_str = str(w, '#');
      |                         ^~~
      |                         std
Language: C++

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

int main(){
  int h, w;
  cin >> h >> w;
  vector<string> i_str;
  top_last_str = str(w, '#');
  i_str.at(0) = top_last_str;
  for (int i = 0; i < h; ++i){
    string temp;
    cin >> temp;
    temp = "#" + temp + "#";
    i_str.at(i+1) = temp; 
  }
  i_str.at(h + 1) = top_last_str;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'top_last_str' was not declared in this scope
    8 |   top_last_str = str(w, '#');
      |   ^~~~~~~~~~~~
a.cc:8:18: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |   top_last_str = str(w, '#');
      |                  ^~~
      |                  std
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before ':' token
    8 |     cout << "#":
      |                ^
      |                ;
a.cc:9:17: error: 'j' was not declared in this scope
    9 |     for(int j=0;j<W;j++){
      |                 ^
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 j=o; j<H; j++){
  
  cout << "#";
  
  string S;
  cin >> S;
  
  cout << S << "#" <<endl;
   
 }
for (int i=0; i < W+2; i++){
  cout << "#" ;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'o' was not declared in this scope
   14 |  for(int j=o; j<H; j++){
      |            ^
Language: C++

//vector<型> 配列名(要素数, 初期値);

//vector<int> data(3); // vectorによる配列
//int data[3]; // Cの配列
//array<int, 3> data; // arrayによる配列

//cout << vec.at(0) << endl;
//cout << vec[0] << endl; // .at(0)と同じ

//vec.pop_back(); // 末尾の要素を削除


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

int main()
{
  int H,W;
  cin>>H>>W;
  vector<char> a;
  vector<char> b;

  for (int i= 0; i < H; i++) {

    cin>>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]<<endl;
      }
    }

  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:13: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   30 |         b[i][j]='#';
      |             ^
a.cc:36:15: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   36 |         b[i+1][j+1]=a[i][j];
      |               ^
a.cc:36:25: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   36 |         b[i+1][j+1]=a[i][j];
      |                         ^
a.cc:43:19: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
   43 |         cout<<b[i][j]<<endl;
      |                   ^
a.cc:49:2: error: expected '}' at end of input
   49 | }
      |  ^
a.cc:17:1: note: to match this '{'
   17 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, M;
  cin >> N >> M;
  vector<string> ans_vec(N+2);
  for (int i=0;i<M;i++){
    ans_vec.at(0) += '#';
    ans_vec.at(N+1) += '#';
  }
    ans_vec[]
  for(int i = 0;i<N;i++){
   cin >> ans_vec.at(i+1); 
    ans_vec.at(i+1) = '#' + ans_vec.at(i+1) +'#';
  }

  
   for (int i = 0; i < ans_vec.size(); i ++){
   cout << ans_vec.at(i) << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: expected primary-expression before ']' token
   12 |     ans_vec[]
      |             ^
a.cc:13:17: error: 'i' was not declared in this scope
   13 |   for(int i = 0;i<N;i++){
      |                 ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before '}' token
   14 |     cout << "#"
      |                ^
      |                ;
   15 |   }
      |   ~             
a.cc:23:16: error: expected ';' before '}' token
   23 |     cout << "#"
      |                ^
      |                ;
   24 |   }
      |   ~
Language: C++

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

int main() {
  int H ,N;
  cin >> H >> N;
  
  vector<int> pic(H);
  for(int i=0; i<H; i++){
    cin >> pic.at(i) ;
  }
  
  for(i=0; i<(N+2); i++){
    cout << "#" 
  }
  cout << endl;
      
  for(i=0; i<H; i++){
    cout << "#" << pic.at(i) << "#" <<endl;
  }
  
  for(i=0; i<(N+2); 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<(N+2); i++){
      |       ^
a.cc:14:16: error: expected ';' before '}' token
   14 |     cout << "#"
      |                ^
      |                ;
   15 |   }
      |   ~             
a.cc:18:7: error: 'i' was not declared in this scope
   18 |   for(i=0; i<H; i++){
      |       ^
a.cc:22:7: error: 'i' was not declared in this scope
   22 |   for(i=0; i<(N+2); i++){
      |       ^
a.cc:23:16: error: expected ';' before '}' token
   23 |     cout << "#"
      |                ^
      |                ;
   24 |   }
      |   ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: 'i' was not declared in this scope
   31 |     S += vec.at(i);
      |                 ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: expected ';' before 'for'
   15 |   S = ""
      |         ^
      |         ;
   16 | 
   17 |   for (int i = 0; i < H; i++) {
      |   ~~~    
a.cc:17:19: error: 'i' was not declared in this scope
   17 |   for (int i = 0; i < H; i++) {
      |                   ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:28:20: error: expected ';' before 'S'
   28 |     vec.at(i) = '#'
      |                    ^
      |                    ;
   29 |     S += vec.at(i);
      |     ~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: redeclaration of 'std::vector<char> vec'
   21 |     vector<char> vec(W+2, '#');
      |                  ^~~
a.cc:8:16: note: 'std::vector<char> vec' previously declared here
    8 |   vector<char> vec(W+2, '#');
      |                ^~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: 'j' was not declared in this scope
   17 |     cout << vec.at(j) << endl;
      |                    ^
a.cc:20:18: error: redeclaration of 'std::vector<char> vec'
   20 |     vector<char> vec(W+2, '#');
      |                  ^~~
a.cc:8:16: note: 'std::vector<char> vec' previously declared here
    8 |   vector<char> vec(W+2, '#');
      |                ^~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: 'j' was not declared in this scope
   17 |     cout << vec.at(j) << endl;
      |                    ^
a.cc:20:18: error: redeclaration of 'std::vector<char> vec'
   20 |     vector<char> vec(W+2, '#');
      |                  ^~~
a.cc:8:16: note: 'std::vector<char> vec' previously declared here
    8 |   vector<char> vec(W+2, '#');
      |                ^~~
Language: C++

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



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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: expected '(' before '{' token
   18 |     for{int i=1;i<=w+2;i++}cout<<'#';
      |        ^
      |        (
a.cc:18:8: error: expected primary-expression before '{' token
a.cc:19:15: error: expected ')' before ';' token
   19 |     cout<<endl;
      |               ^
      |               )
a.cc:18:8: note: to match this '('
   18 |     for{int i=1;i<=w+2;i++}cout<<'#';
      |        ^
a.cc:27:8: error: expected '(' before '{' token
   27 |     for{int i=1;i<=w+2;i++}cout<<'#';
      |        ^
      |        (
a.cc:27:8: error: expected primary-expression before '{' token
a.cc:28:15: error: expected ')' before ';' token
   28 |     cout<<endl;
      |               ^
      |               )
a.cc:27:8: note: to match this '('
   27 |     for{int i=1;i<=w+2;i++}cout<<'#';
      |        ^
Language: C++

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

string makeflame(int n){
    string s = "";
    for(int i = 0;i < n;i++){
        s += "#";
    }
    retrun s;
}
int main(void){
   int h,w;
   cin >> h >> w;
   vector<string> s(h);
   for(int i = 0;i < h;i++){
       cin >> s[i];
   }
   vector<string> ans(h + 2);
   
   for(int i = 0;i < ans.size();i++){
       if(i == 0 || i == ans.size() - 1){
           ans[i] = makeflame(w);
       }else{
           ans[i] = "#" + s[i - 1] + "#";
       }
   }
   
  for(int i = 0;i < ans.size();i++){
        cout << ans[i] << endl;
  }
   
}


Compiler output:
a.cc: In function 'std::string makeflame(int)':
a.cc:11:5: error: 'retrun' was not declared in this scope
   11 |     retrun s;
      |     ^~~~~~
a.cc:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
   12 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:10:27: note: to match this '{'
   10 |     for(int j=0;j<W+2;j++){
      |                           ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:9:25: note: to match this '{'
    9 |   for(int i=0;i<H+2;i++){
      |                         ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'for'
    8 |   cin>>H>>W
      |            ^
      |            ;
    9 |   for(int i=0;i<H+2;i++){
      |   ~~~       
a.cc:9:15: error: 'i' was not declared in this scope
    9 |   for(int i=0;i<H+2;i++){
      |               ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'for'
    8 |   cin>>H>>W
      |            ^
      |            ;
    9 |   for(i=0;i<H+2;i++){
      |   ~~~       
a.cc:9:11: error: 'i' was not declared in this scope
    9 |   for(i=0;i<H+2;i++){
      |           ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:33:4: error: expected '}' at end of input
   33 |   }
      |    ^
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;
  
  for(int i = 0; i<W+2; i++){
    cout << "#";
  }
  cout << endl;
  
  for(int j = 0; j < H; j++){
  	vecter<char> date(W);
    
  	for(int i = 0; i < W+2; i++){
      if(i == 0 || i == W+1){
        cout << "#";
      }
      else{
        cin >> date.at(i-1);
        cout << date.at(i-1);
      }
    }
    cout << endl;
    
  }
  
   for(int i = 0; i<W+2; i++){
    cout << "#";
  }
  cout << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'vecter' was not declared in this scope
   14 |         vecter<char> date(W);
      |         ^~~~~~
a.cc:14:16: error: expected primary-expression before 'char'
   14 |         vecter<char> date(W);
      |                ^~~~
a.cc:21:16: error: 'date' was not declared in this scope
   21 |         cin >> date.at(i-1);
      |                ^~~~
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 j = 0; j < H; j++){
  	vecter<int> date(W);
    
  	for(int i = 0; i < W+2; i++){
      if(i == 0 || i == W+1){
        cout << "#";
      }
      else{
        cin >> date.at(i-1);
        cout << date.at(i-1);
      }
    }
    cout << endl;
    
  }
  
   for(int i = 0; i<W+2; i++){
    cout << "#";
  }
  cout << endl;
  
}
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'vecter' was not declared in this scope
   14 |         vecter<int> date(W);
      |         ^~~~~~
a.cc:14:16: error: expected primary-expression before 'int'
   14 |         vecter<int> date(W);
      |                ^~~
a.cc:21:16: error: 'date' was not declared in this scope
   21 |         cin >> date.at(i-1);
      |                ^~~~
Language: C++

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

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


Compiler output:
a.cc:8:2: error: extended character 　 is not valid in an identifier
    8 |  　vector<vector<char>> vec(H + w)(W + 2);
      |  ^
a.cc: In function 'int main()':
a.cc:8:2: error: '\U00003000vector' was not declared in this scope
    8 |  　vector<vector<char>> vec(H + w)(W + 2);
      |  ^~~~~~~~
a.cc:8:22: error: expected primary-expression before '>' token
    8 |  　vector<vector<char>> vec(H + w)(W + 2);
      |                      ^~
a.cc:8:33: error: 'w' was not declared in this scope
    8 |  　vector<vector<char>> vec(H + w)(W + 2);
      |                                 ^
a.cc:8:25: error: 'vec' was not declared in this scope
    8 |  　vector<vector<char>> vec(H + w)(W + 2);
      |                         ^~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: expected ',' or ';' before '(' token
    8 |   vector<char> vec(H + 2)(W + 2);
      |                          ^
a.cc:11:14: error: expression cannot be used as a function
   11 |     vec.at(0)(i) = '#';
      |     ~~~~~~~~~^~~
a.cc:12:18: error: expression cannot be used as a function
   12 |     vec.at(H + 2)(i) = '#';
      |     ~~~~~~~~~~~~~^~~
a.cc:15:18: error: expression cannot be used as a function
   15 |     vec.at(i + 1)(0) = '#';
      |     ~~~~~~~~~~~~~^~~
a.cc:16:18: error: expression cannot be used as a function
   16 |     vec.at(i + 1)(W + 2) = '#';
      |     ~~~~~~~~~~~~~^~~~~~~
a.cc:21:24: error: expression cannot be used as a function
   21 |       cout << vec.at(i)(j);
      |               ~~~~~~~~~^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: 'o' was not declared in this scope
    7 |   for (int i=o;i<h+2;i++){
      |              ^
a.cc:17:35: error: expected '}' at end of input
   17 |       cout<<a.at(i).at(j)<<endl;}}
      |                                   ^
a.cc:3:12: note: to match this '{'
    3 | int main (){
      |            ^
Language: Java

import java.util.*;

public class Main{
	
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int h=sc.nextInt(),w=sc.nextInt();
    char[][] c=new char[h][w];
    for(int i=0;i<h+2;i++){
      if(i==0||i==h+1){
        for(int j=0;j<m+2;j++){
          System.out.print("#");
        }
      }else{
        c[i]=sc.next().toCharArray();
        for(int j=0;j<m+2;j++){
          if(j==0||j==m+1){
            System.out.print("#");
          }else{
            System.out.print(c[i][j-1]);
          }
        }
      }
      System.out.print("\n");
    }
  }
}


Compiler output:
Main.java:11: error: cannot find symbol
        for(int j=0;j<m+2;j++){
                      ^
  symbol:   variable m
  location: class Main
Main.java:16: error: cannot find symbol
        for(int j=0;j<m+2;j++){
                      ^
  symbol:   variable m
  location: class Main
Main.java:17: error: cannot find symbol
          if(j==0||j==m+1){
                      ^
  symbol:   variable m
  location: class Main
3 errors
Language: Java

import java.util.*;

public class Main{
	
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int h=sc.nextInt(),w=sc.nextInt();
    char[][] c=new char[h][w];
    for(int i=0;i<h+2;i++){
      if(i==0||i==h+1){
        for(int j=0;j<m+2;j++){
          System.out.print("#");
        }
      }else{
        c[i]=sc.next().toCharArray();
        for(int j=0;j<m+2;j++){
          if(j==0||j==m+1){
            System.out.print("#");
          }else{
            System.out.print(c[i][j]);
          }
        }
      }
      System.out.print("\n");
    }
  }
}


Compiler output:
Main.java:11: error: cannot find symbol
        for(int j=0;j<m+2;j++){
                      ^
  symbol:   variable m
  location: class Main
Main.java:16: error: cannot find symbol
        for(int j=0;j<m+2;j++){
                      ^
  symbol:   variable m
  location: class Main
Main.java:17: error: cannot find symbol
          if(j==0||j==m+1){
                      ^
  symbol:   variable m
  location: class Main
3 errors
Language: C++

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

int main() {
  int H, W;
  cin >> H >> W;
  vector <cha> top(W+2,'#');
  cout << top << endl;
  for(int j; j<H; j++){
  vector <cha> middle(W);
  for(int i; i<W; i++){
    cin >> middle.at(i);
  }
  cout << '#' << middle << '#' << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'cha' was not declared in this scope; did you mean 'char'?
    7 |   vector <cha> top(W+2,'#');
      |           ^~~
      |           char
a.cc:7:14: error: template argument 1 is invalid
    7 |   vector <cha> top(W+2,'#');
      |              ^
a.cc:7:14: error: template argument 2 is invalid
a.cc:7:27: error: expression list treated as compound expression in initializer [-fpermissive]
    7 |   vector <cha> top(W+2,'#');
      |                           ^
a.cc:10:14: error: template argument 2 is invalid
   10 |   vector <cha> middle(W);
      |              ^
a.cc:12:19: error: request for member 'at' in 'middle', which is of non-class type 'int'
   12 |     cin >> middle.at(i);
      |                   ^~
Language: C++

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

int main(){
  int h,w;
  cin>>h>>w;
  char a[1000][1000],b[1000][1000];
  for(int i=1;i<=h+2;i++){
    for(int j=1;j<=w+2;j++){
      b[i][j]='#';
    }
  }
  for(i=1;i<=h;i++){
    for(int j=1;j<=w;j++){
      cin>>a[i][j];
    }
  }
  for(i=2;i<=h+1;i++){
    for(int j=2;j<=w+1;j++){
      b[i][j]=a[i-1][j-1];
    }
  }
  for(int i=1;i<=h+2;i++){
    for(int j=1;j<=w+2;j++){
      cout<<b[i][j];
    }
    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=1;i<=h;i++){
      |       ^
a.cc:18:7: error: 'i' was not declared in this scope
   18 |   for(i=2;i<=h+1;i++){
      |       ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:23: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} [-fpermissive]
   16 |       ans.at(i).at(j)="#";
      |                       ^~~
      |                       |
      |                       const char*
Language: C++

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

int main(){
  int H, W;  // H=高さ, W=幅
  cin >> H >> W;

  char Pic;
  vector <char>  Frame1(W+1,'#');
  vector <char>  Frame2(W+1,'#');

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

  for (int j=0; j<H; j++){
    cout << '#' ;
    for (int i=0; i<W; i++){
      cin >> Pic;
      cout << Pic;
    }
    cout << '#' << endl;
  }

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: 'i' was not declared in this scope
   18 |   for(int k=0;i<W+2;k++)
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int H,W;
  cin >> H >> W;
  vector<string> str(H);
  
  for(int i=0;i<H;i++){
    cin >> str(i);
  }
  
  for(int i=-1;i<H+1;i++){
    if(i==-1||i==W){
      for(int j =0;j<W+2;j++){
        cout << "#";
        if(j==W+1){
          cout << endl;
        }
      }
    }else{
      cout << "#" << str(i) << 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 >> str(i);
      |            ~~~^~~
a.cc:22:25: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   22 |       cout << "#" << str(i) << endl;
      |                      ~~~^~~