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

#include<stdio.h>
#include<string.h>
int main()
{
	int r,a,b,c,h,i,k,t;
	char ch[20];
	while(scanf("%d%d",&a,&b)!=EOF)
	{
		getchar();
		t=1;
		printf("#");
		for(i=1;i<=b;i++)
		printf("#");
		printf("#\n");
		t=1;
		for(i=1;i<=a;i++)
	    {
	    printf("#");
		scanf("%s",&ch);
		printf("%s",ch);
		printf("#\n");
		}
		for(i=0;i<=b;i++)
		printf("#");
		printf("#\n");
	}
	ret

Compiler output:
main.c: In function 'main':
main.c:27:9: error: 'ret' undeclared (first use in this function)
   27 |         ret
      |         ^~~
main.c:27:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:27:12: error: expected ';' at end of input
   27 |         ret
      |            ^
      |            ;
main.c:27:9: error: expected declaration or statement at end of input
   27 |         ret
      |         ^~~
Language: C

#include<stdio.h>
#include<String.h>
int main()
{
	int r,a,b,c,h,i,k,t;
	char ch[20];
	while(scanf("%d%d",&a,&b)!=EOF)
	{
		getchar();
		t=1;
		printf("#");
		for(i=1;i<=b;i++)
		printf("#");
		printf("#\n");
		t=1;
		for(i=1;i<=a;i++)
	    {
	    printf("#");
		scanf("%s",&ch);
		printf("%s",ch);
		printf("#\n");
		}
		for(i=0;i<=b;i++)
		printf("#");
		printf("#\n");
	}
	return 0;
}

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

#include<stdio.h>
#include<String.h>
int main()
{
	int r,a,b,c,h,i,k,t;
	char ch[20];
	while(scanf("%d%d",&a,&b)!=EOF)
	{
		getchar();
		t=1;
		printf("#");
		for(i=1;i<=b;i++)
		printf("#");
		printf("#\n");
		t=1;
		for(i=1;i<=a;i++)
	    {
	    printf("#");
		scanf("%s",&ch;
		printf("%s",ch);
		printf("#\n");
		}
		for(i=0;i<=b;i++)
		printf("#");
		printf("#\n");
	}
	return 0;
}

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

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

Compiler output:
main.c:1:18: warning: extra tokens at end of #include directive
    1 | #include<stdio.h>char a[10000][10000];int main (){      int h,w,i,j;            scanf("%d%d",&h,&w);    for(i=0;i<h;i++)        {               scanf("%s",&a[i]);      }       for(i=0;i<w+1;i++)      {               printf("#");    }       printf("#\n");  for(i=0;i<h;i++)        {               printf("#");            for(j=0;j<w;j++)                {                       printf("%c",a[i][j]);           }               printf("#\n");  }       for(i=0;i<w+1;i++)      {               printf("#");    }       printf("#\n");  return 0; }
      |                  ^~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include "stdafx.h"
#include <algorithm>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <string>
#include <bitset>
#include <cmath>
#include <map>
#include <set>
#define pi 3.1415926

using namespace std;

int main()
{
	int ht, wd;
	while (cin >> ht >> wd)
	{
		vector<string> v;
		for (int i = 0; i < ht; i++)
		{
			string t;
			cin >> t;
			v.push_back(t);
		}
		string s = "", ans = "";
		s += "#";
		s += string(wd, '#');
		s += "#";
		s += "\n";
		ans += s;
		for (int i = 0; i < ht; i++)
		{
			s = "";
			s += "#";
			s += v[i];
			s += "#";
			s += "\n";
			ans += s;
		}
		s = "";
		s += "#";
		s += string(wd, '#');
		s += "#";
		s += "\n";
		ans += s;
		cout << ans << flush;
	}
	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<String.h>
int main()
{
	int r,a,b,c,h,i,k,t;
	char ch[20];
	while(scanf("%d%d",&a,&b)!=EOF)
	{
		getchar();
		t=1;
		for(i=1;i<=a;i++)
		{ 
		scanf("%s",&ch[t]);
		getchar();
        t+=b;
		}
		printf("#");
		for(i=1;i<=b;i++)
		printf("#");
		printf("#\n");
		t=1;
		for(i=1;i<=a;i++)
	    {
	    printf("#");
	    for(k=t;k<=(t+b-1);k++)
	    {
		printf("%c",ch[k]);
		}
		t+=b;
		printf("#\n");
		}
		for(i=0;i<=b;i++)
		printf("#");
		printf("#\n");
	}
	return 0;
}

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

#include<Stdio.h>
#include<string.h>
int main()
{
	int n,m,i,v,j;
	while(scanf("%d%d",&n,&m)!=EOF)
	{
		char a[n+2][m+2];
		v=(n+2)*(m+2);
		memset(a,'#',sizeof(char)*v);
	    for(i=1;i<=n;i++)
		{
			for(j=1;j<=m;j++)
			{
				scanf("\n%c",&a[i][j]);
			}
		}
		for(i=0;i<n+2;i++)
		{
			for(j=0;j<m+2;j++)
			{
				printf("%c",a[i][j]);
			}
			printf("\n");
		}
	}
	return 0;
}

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

#include<Stdio.h>
#include<string.h>
int main()
{
	int n,m,i,v,j;
	while(scanf("%d%d",&n,&m)!=EOF)
	{
		char a[n+2][m+2];
		v=(n+2)*(m+2);
		memset(a,'#',sizeof(char)*v);
	    for(i=1;i<=n;i++)
		{
			for(j=1;j<=m;j++)
			{
				scanf("\n%c",&a[i][j]);
			}
		}
		for(i=0;i<n+2;i++)
		{
			for(j=0;j<m+2;j++)
			{
				printf("%c",a[i][j]);
			}
			printf("\n");
		}
	}
	return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |                 gets(a[i]);
      |                 ^~~~
      |                 getw
Language: C++

#include<stdio.h>
#include<String.h>
int main()
{
	int r,a,b,c,h,i,k,t;
	char ch[20];
	while(scanf("%d%d",&a,&b)!=EOF)
	{
		getchar();
		t=1;
		for(i=1;i<=a;i++)
		{ 
		scanf("%s",&ch[t]);
		getchar();
        t+=b;
		}
		printf("#");
		for(i=1;i<=b;i++)
		printf("#");
		printf("#\n");
		t=1;
		for(i=1;i<=a;i++)
	    {
	    printf("#");
	    for(k=t;k<=(t+b-1);k++)
	    {
		printf("%c",ch[k]);
		}
		t+=b;
		printf("#\n");
		}
		for(i=0;i<=b;i++)
		printf("#");
		printf("#\n");
	}
	return 0;
}

Compiler output:
a.cc:2:9: fatal error: String.h: No such file or directory
    2 | #include<String.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(void)
{
  int i;
  int h , w;
  char b[128][128]={0};
  scanf("%d %d", &h, &w);
  for(i=1; i<=h;++i){
    b[i][0]='#';
    scanf("%s", &b[i][1]);
    b[i][w+1]='#';
  }
  for(i=0;i<=w+1;++i){
    b[0][i]='#';
    b[h+1][i]='#';
  }
  for(i=0;i<=h+1;++i){
    printf("%s\n", b[i]));
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:25: error: expected ';' before ')' token
   19 |     printf("%s\n", b[i]));
      |                         ^
      |                         ;
main.c:19:25: error: expected statement before ')' token
Language: C++

#include<iostream.h>
using namespace std;
int main()
{ int H,W,arr[100][100];
cin>>H;
cin>>W;
for(int i=0;i<W;i++)
for(int j=0;j<H;j++)
{ cin>>arr[i][j];
}
for(int i=0;i<=W;i++)
for(int j=0;j<=H;j++)
{if(i==W||j==H)
{cout<<"#";}
else 
{cout<<arr[i][j];}
return=0;
}

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

#include<iostream<>
#include<stdio.h>
#include<stdlib.h>

using namespace std;

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

return 0;
}


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

#include<iostream>
#include<stdiuo.h>
#include<stdlib.h>

using namespace std;

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

return 0;
}


Compiler output:
a.cc:2:9: fatal error: stdiuo.h: No such file or directory
    2 | #include<stdiuo.h>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream<>
#include<stdiuo.h>
#include<stdlib.h>

using namespace std;

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

return 0;
}


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

#include<iostream>
using namespace std;
int main()
{ int H,W,arr[100][100];
cin>>H;
cin>>W;
for(int i=0;i<W;i++)
for(int j=0;j<H;j++)
{ cin>>arr[i][j];
}
for(int i=0;i<=W;i++)
for(int j=0;j<=H;j++)
{if(i==W||j==H)
{cout<<"#";}
else 
{cout<<arr[i][j];}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | { int H,W,arr[100][100];
      | ^
Language: C++

#include<iostream.h>
using namespace std;
int main()
{ int H,W,arr[100][100];
cin>>H;
cin>>W;
for(int i=0;i<W;i++)
for(int j=0;j<H;j++)
{ cin>>arr[i][j];
}
for(int i=0;i<=W;i++)
for(int j=0;j<=H;j++)
{if(i==W||j==H)
{cout<<"#";}
else 
{cout<<arr[i][j];}
return 0;
}

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

#include<iostream>
using namespace std;
int main()
{ int H,W,arr[100][100];
cin>>H;
cin>>W;
for(int i=0;i<W;i++)
for(int j=0;j<H;j++)
{ cin>>arr[i][j];
}
for(i=0;i<=W;i++)
for(j=0;j<=H;j++)
{if(i==W||j==H)
{cout<<"#";}
else 
{cout<<arr[i][j];}
return=0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'i' was not declared in this scope
   11 | for(i=0;i<=W;i++)
      |     ^
a.cc:12:5: error: 'j' was not declared in this scope
   12 | for(j=0;j<=H;j++)
      |     ^
a.cc:17:7: error: expected primary-expression before '=' token
   17 | return=0;
      |       ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | { int H,W,arr[100][100];
      | ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<stdlib.h>


using namespace std;
int main()
{int H,W,i=0;
cin>>H;
cout<<" ";
cin>>W;
cout<<endl;
 char a[H][w];
for(i=0;i<H;i++)
{for(int j=0;j<W;j=++)
{cin>>a[i][j];}
cout<<endl;
}
for(i=0;i<W+2;i++)
cout<<'#';
for(i=0;i<H;i++)
{cout<<'#';
for(int j=0;j<W;j=++)
{cout<<a[i][j];}
cout<<'#';
cout<<endl;
}
for(i=0;i<W+2;i++)
cout<<'#';
 return 0;
}







}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'w' was not declared in this scope
   13 |  char a[H][w];
      |            ^
a.cc:15:22: error: expected primary-expression before ')' token
   15 | {for(int j=0;j<W;j=++)
      |                      ^
a.cc:16:7: error: 'a' was not declared in this scope
   16 | {cin>>a[i][j];}
      |       ^
a.cc:23:21: error: expected primary-expression before ')' token
   23 | for(int j=0;j<W;j=++)
      |                     ^
a.cc:24:8: error: 'a' was not declared in this scope
   24 | {cout<<a[i][j];}
      |        ^
a.cc: At global scope:
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: C++

#include<iostream.h>
using namespace std;
int main()
{ int H,W,arr[100][100];
cin>>H;
cin>>W;
for(int i=0;i<W;i++)
for(int j=0;j<H;j++)
{ cin>>arr[i][j];
}
for(i=0;i<=W;i++)
for(j=0;j<=H;j++)
{if(i==W||j==H)
{cout<<"#";}
else 
{cout<<arr[i][j];}
return=0;
}


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

#include<iostream>
#include<stdio.h>
#include<stdlib.h>


using namespace  std;


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

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



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

#include<stdio.h>
int main()
{
int h,w;
char a[100][100];
for(i=0;i<h;i++)
for(j=0;j<w;j++);
scanf("%c",a[i][j]);
for(i=0;i<h+2;i++)
{
for(j=0;j<w+2;j++)
{
if(i==0||i==(h+1)||j==0||j==w+1)
printf("#");
else
printf("%c",a[i-1][j-1])
}
}
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:5: error: 'i' undeclared (first use in this function)
    6 | for(i=0;i<h;i++)
      |     ^
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:5: error: 'j' undeclared (first use in this function)
    7 | for(j=0;j<w;j++);
      |     ^
main.c:16:25: error: expected ';' before '}' token
   16 | printf("%c",a[i-1][j-1])
      |                         ^
      |                         ;
   17 | }
      | ~
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
using namespace std;
const double PI = acos(-1.0);
const string ALP = "abcdefghijklmnopqrstuvwxyz";
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
int main(){
  int h,w;
  str s;
  cin >> h >> w;
  REP(i,w+2)cout << "#";
  REP(i,h){
    cout << endl << "#";
    cin >> s;
    cout << s;
    cout << "#" << endl;
  }
  REP(i,w+2)cout << "#";
  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'str' was not declared in this scope; did you mean 'std'?
   15 |   str s;
      |   ^~~
      |   std
a.cc:20:12: error: 's' was not declared in this scope
   20 |     cin >> s;
      |            ^
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+2;i++)
    {
        for(int j=0;j<w+2;j++)
        {
            a[i][j]='#';
        }
    }
    for(int i=1;i<h+1;i++)
        for(int j=1;j<w+1;j++)
    {
        cin >> a[i][j];
    }
    for(int i=0;i<h+2;i++)
    {
        for(int j=0;j<w+2;j++)
        {
            cout << a[i][j];
        }
        cout<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'for'
    8 |     for(int i=0;i<h+2;i++)
      |     ^~~
a.cc:8:17: error: 'i' was not declared in this scope
    8 |     for(int i=0;i<h+2;i++)
      |                 ^
a.cc:18:16: error: 'a' was not declared in this scope
   18 |         cin >> a[i][j];
      |                ^
a.cc:24:21: error: 'a' was not declared in this scope
   24 |             cout << a[i][j];
      |                     ^
Language: C

#include<stdio.h>
#include<string.h>
int main(){
    int m,n,i,j;
    char str[100][100];
    scanf("%d%d",&m,&n);
    for(i=0;i<m;i++){
        scanf("%s",str[i]);
    }
   for(i=0;i<n+2;i++){
     printf("#");
   }
   printf("\n");
   for(i=0;i<m;i++){
     printf("#");
     for(j=0;j<n;j++){
        printf("%c",str[i][j]);
     }
     printf("#\n");
   }
   for(i=0;i<n+2;i++){
      printf("#");
   }
   printf("\n");
   return 0;
}
装箱子


Compiler output:
main.c:27:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   27 | 装箱子
      | ^~~~~~
Language: C++

# -*- coding: utf-8 -*-

import sys
import subprocess
import json
import time
import math
import re
import sqlite3

H, W = map(int, input().split())
a = []

a.append('#' * W)

for i in range(H):
    a.append(input())
    
a.append('#' * W)

for i in range(len(a)):
    a[i] = '#' + a[i] + '#'
    print(a[i])




Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:3:1: error: 'import' does not name a type
    3 | import sys
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C

#include <stdio.h>

int main(){
    int n,m;
    char ch[100][100];
    scanf("%d %d",&n,&m);
    getchar();
    for(int i=0; i<n; i++){
        for(int j=0; j<m; j++){
            scanf("%c",&ch[i][j]);
        }
        getchar();
    }
    for(int i=0; i<=m+1; i++){
        printf("#");
    }
    printf("\n");
    for(int i=0; i<n; i++){
        printf("#");
        for(int j=0; j<m; j++){
            printf("%c",ch[i][j]);
        }
        printf("#\n");
    }
   for(int i=0; i<=m+1; i++){
        printf("#");
    }
    return 0;

Compiler output:
main.c: In function 'main':
main.c:28:5: error: expected declaration or statement at end of input
   28 |     return 0;
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define SORTR(v,n) sort(v, v+n, greater<int>());
// #define int long long    // %d=>%lld
#define pb push_back
#define INF 1000000000
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<int, pii> piii;
typedef pair<ll, pll> plll;

int h;
int w;


char buf1[100+1];
string s[100+1];


signed main(){
    scanf("%d", &h);

    scanf("%d", &w);


    for(int i = 0;i < h;i++){
        scanf("%s", buf1);
        s[h](buf1);
    }

    for(int i = 0;i < w+2;i++){
        cout << '#';
    }
    cout << '\n';
    for(int i = 0;i < h;i++){
        cout<< '#'<< s[i]<< '#'<< '\n';
    }
    for(int i = 0;i < w+2;i++){
        cout << '#';
    }
    cout << '\n';
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:13: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (char [101])'
   32 |         s[h](buf1);
      |         ~~~~^~~~~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

#include <functional>
#include <cassert>

typedef long long ll;
using namespace std;

#define debug(x) cerr << #x << " = " << (x) << endl;


#define mod 1000000007 //1e9+7(prime number)
#define INF 1000000000 //1e9
#define LLINF 2000000000000000000LL //2e18
#define SIZE 110


int main(){
  char s[SIZE][SIZE];

  int h,w;

  scanf("%d%d",&h,&w);

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

  for(int i=0;i<w+2;i++){
    printf("#");
  }
  puts("");
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:21: error: expected ';' before 'printf'
   43 |     scanf("%s",s[i])
      |                     ^
      |                     ;
   44 |       printf("#%s#\n",s[i]);
      |       ~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <functional>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <deque>
#include <ctime>

using namespace std;

#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define pb push_back
#define mp make_pair
#define all(r) (r).begin(),(r).end()
#define rall(r) (r).rbegin(),(r).rend()
#define fi first
#define se second
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))


typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int INF = 1e9;
const ll LINF = 1e18;
const ll MOD = 1e9 + 7;
double EPS = 1e-8;
const double PI = acos(-1);

int dx[]={-1,1,0,0};
int dy[]={0,0,-1,1};


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




Compiler output:
a.cc:58:35: error: extended character ’ is not valid in an identifier
   58 |                         b[i][j] = ’#’;
      |                                   ^
a.cc:58:36: error: stray '#' in program
   58 |                         b[i][j] = ’#’;
      |                                    ^
a.cc:58:37: error: extended character ’ is not valid in an identifier
   58 |                         b[i][j] = ’#’;
      |                                     ^
a.cc: In function 'int main()':
a.cc:58:35: error: '\U00002019' was not declared in this scope
   58 |                         b[i][j] = ’#’;
      |                                   ^
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <functional>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <deque>
#include <ctime>

using namespace std;

#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define pb push_back
#define mp make_pair
#define all(r) (r).begin(),(r).end()
#define rall(r) (r).rbegin(),(r).rend()
#define fi first
#define se second
#define ARRAY_LENGTH(array) (sizeof(array) / sizeof(array[0]))


typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int INF = 1e9;
const ll LINF = 1e18;
const ll MOD = 1e9 + 7;
double EPS = 1e-8;
const double PI = acos(-1);

int dx[]={-1,1,0,0};
int dy[]={0,0,-1,1};


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]  = 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:58:35: error: extended character ’ is not valid in an identifier
   58 |                         b[i][j] = ’#’;
      |                                   ^
a.cc:58:36: error: stray '#' in program
   58 |                         b[i][j] = ’#’;
      |                                    ^
a.cc:58:37: error: extended character ’ is not valid in an identifier
   58 |                         b[i][j] = ’#’;
      |                                     ^
a.cc: In function 'int main()':
a.cc:51:17: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   51 |         int main() {
      |                 ^~
a.cc:51:17: note: remove parentheses to default-initialize a variable
   51 |         int main() {
      |                 ^~
      |                 --
a.cc:51:17: note: or replace parentheses with braces to value-initialize a variable
a.cc:51:20: error: a function-definition is not allowed here before '{' token
   51 |         int main() {
      |                    ^
a.cc:69:2: error: expected '}' at end of input
   69 | }
      |  ^
a.cc:49:1: note: to match this '{'
   49 | {
      | ^
Language: C++

#include <iostream>
#include <string>

int main ()
{
	char a[100][101], b[102][102];


	int H, W; 
	cin >> H >> W;
	for (int i = 0; i < H; i++) 
		scanf("%s", a[i]);

	for (int i = 0; i < H + 2; i++)
		for (int j = 0; j < W + 2; j++)
			b[i][j] = '#';

	for (int i = 0; i < H; i++)
		for (int j = 0; j < W; j++)
	       b[i + 1][j + 1]  = a[i][j];

	for (int i = 0; i < H + 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:10:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   10 |         cin >> H >> W;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:24:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |                 cout << b[i][j];
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:25:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |                 cout << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:25:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |                 cout << endl;
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
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:9:27: error: extended character ’ is not valid in an identifier
    9 |                 b[i][j] = ’#’;
      |                           ^
a.cc:9:28: error: stray '#' in program
    9 |                 b[i][j] = ’#’;
      |                            ^
a.cc:9:29: 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:9: error: 'scanf' was not declared in this scope
    5 |         scanf("%s", a[i]);
      |         ^~~~~
a.cc:9:27: error: '\U00002019' was not declared in this scope
    9 |                 b[i][j] = ’#’;
      |                           ^
a.cc:17:9: error: 'cout' was not declared in this scope
   17 |         cout << b[i][j];
      |         ^~~~
a.cc:18:9: error: 'cout' was not declared in this scope
   18 |         cout << endl;
      |         ^~~~
a.cc:18:17: error: 'endl' was not declared in this scope
   18 |         cout << endl;
      |                 ^~~~
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:2:12: note: to match this '{'
    2 | int main() {
      |            ^
Language: Java

import java.util.Scanner;
 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
 
    int H = sc.nextInt();
    int W = sc.nextInt();
 
    for(int i = 0; i <= W+1; i++) {
        System.out.print("#");
    }
    System.out.println("#");
 
    for(int j = 0; j <= H; j++) {
        System.out.print("#");
        System.out.print(sc.next());
    }
        System.out.println("#");
 
     for(int i = 0; i <= W+1; i++) {
        System.out.print("#");
    }
        System.out.println("#");
  }

Compiler output:
Main.java:25: error: reached end of file while parsing
  }
   ^
1 error
Language: Java

import java.util.Scanner;
 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
 
    int H = sc.nextInt();
    int W = sc.nettInt();
 
    for(int i = 0; i <= W; i++) {
        System.out.print("#");
    }
    System.out.println("#");
 
    for(int j = 0; j <= H; j++) {
        System.out.print("#");
        System.out.print(sc.next());
    }
        System.out.println("#");
 
     for(int i = 0; i <= W; i++) {
        System.out.print("#");
    }
        System.out.println("#");
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    int W = sc.nettInt();
              ^
  symbol:   method nettInt()
  location: variable sc of type Scanner
1 error
Language: Java

import java.util.Scanner;
 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
 
    int H = sc.nextInt();
    int W = sc.nettInt();
 
    for(int i = 0; i <= W; i++) {
        System.out.print(#);
    }
    System.out.println(#);
 
    for(int j = 0; j <= H; j++) {
        System.out.print(#);
        System.out.print(sc.next());
    }
        System.out.println(#);
 
     for(int i = 0; i <= W; i++) {
        System.out.print(#);
    }
        System.out.println(#);
  }
}

Compiler output:
Main.java:11: error: illegal character: '#'
        System.out.print(#);
                         ^
Main.java:13: error: illegal character: '#'
    System.out.println(#);
                       ^
Main.java:16: error: illegal character: '#'
        System.out.print(#);
                         ^
Main.java:19: error: illegal character: '#'
        System.out.println(#);
                           ^
Main.java:22: error: illegal character: '#'
        System.out.print(#);
                         ^
Main.java:24: error: illegal character: '#'
        System.out.println(#);
                           ^
6 errors
Language: Java

import java.util.Scanner;
 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
 
    int H = sc.nextInt();
    int W = sc.nettInt();
 
    for(int i = 0, i <= W, i++) {
        System.out.print(#);
    }
    System.out.println(#);
 
    for(int j = 0, j <= H, j++) {
        System.out.print(#);
        System.out.print(sc.next());
    }
        System.out.println(#);
 
     for(int i = 0, i <= W, i++) {
        System.out.print(#);
    }
        System.out.println(#);
  }
}

Compiler output:
Main.java:10: error: ';' expected
    for(int i = 0, i <= W, i++) {
                    ^
Main.java:10: error: illegal start of expression
    for(int i = 0, i <= W, i++) {
                     ^
Main.java:10: error: ';' expected
    for(int i = 0, i <= W, i++) {
                         ^
Main.java:11: error: illegal character: '#'
        System.out.print(#);
                         ^
Main.java:13: error: illegal character: '#'
    System.out.println(#);
                       ^
Main.java:15: error: ';' expected
    for(int j = 0, j <= H, j++) {
                    ^
Main.java:15: error: illegal start of expression
    for(int j = 0, j <= H, j++) {
                     ^
Main.java:15: error: ';' expected
    for(int j = 0, j <= H, j++) {
                         ^
Main.java:16: error: illegal character: '#'
        System.out.print(#);
                         ^
Main.java:19: error: illegal character: '#'
        System.out.println(#);
                           ^
Main.java:21: error: ';' expected
     for(int i = 0, i <= W, i++) {
                     ^
Main.java:21: error: illegal start of expression
     for(int i = 0, i <= W, i++) {
                      ^
Main.java:21: error: ';' expected
     for(int i = 0, i <= W, i++) {
                          ^
Main.java:22: error: illegal character: '#'
        System.out.print(#);
                         ^
Main.java:24: error: illegal character: '#'
        System.out.println(#);
                           ^
15 errors
Language: Java

import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    int H = sc.nextInt();
    int W = sc.nettInt();

    for(i = 0, i <= W, i++) {
        System.out.print(#);
    }
    System.out.println(#);

    for(j = 0, j <= H, j++) {
        System.out.print(#);
        System.out.print(sc.next());
    }
        System.out.println(#);

     for(i = 0, i <= W, i++) {
        System.out.print(#);
    }
        System.out.println(#);
  }
}







Compiler output:
Main.java:10: error: not a statement
    for(i = 0, i <= W, i++) {
                 ^
Main.java:10: error: ';' expected
    for(i = 0, i <= W, i++) {
                          ^
Main.java:11: error: illegal character: '#'
        System.out.print(#);
                         ^
Main.java:13: error: illegal character: '#'
    System.out.println(#);
                       ^
Main.java:15: error: not a statement
    for(j = 0, j <= H, j++) {
                 ^
Main.java:15: error: ';' expected
    for(j = 0, j <= H, j++) {
                          ^
Main.java:16: error: illegal character: '#'
        System.out.print(#);
                         ^
Main.java:19: error: illegal character: '#'
        System.out.println(#);
                           ^
Main.java:21: error: not a statement
     for(i = 0, i <= W, i++) {
                  ^
Main.java:21: error: ';' expected
     for(i = 0, i <= W, i++) {
                           ^
Main.java:22: error: illegal character: '#'
        System.out.print(#);
                         ^
Main.java:24: error: illegal character: '#'
        System.out.println(#);
                           ^
12 errors
Language: C++

#include<string>
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
//#include<map>
using namespace std;
typedef long long int llint;
#define mp make_pair
#define mt make_tuple
#define pub push_back
#define puf push_front
#define pob pop_back
#define pof pop_front
#define izryt bool
#define fi first
#define se second
#define res resize
const llint mod=1000000007;
const llint gya=500000004;//mod modで2の逆元
const llint big=1e9;
const llint red=0xE869120;
const llint pro=1002001;
//10,7,4,1,0,0,0,0,0,0
//aaabbbbaaa
int main(void){
	string str;
	int i,j,H,W;
	cin>>H>>W;
	for(i=0;i<W+2;i++){
		cout<<'#';
	}cout<<endl;
	for(i=0;i<H;i++){
		cout<<'#'
		cin>>str;
		cout<<str;
		cout<<'#'<<endl;
	}
	for(i=0;i<W+2;i++){
		cout<<'#';
	}cout<<endl;
	return 0;
}
		

Compiler output:
a.cc: In function 'int main()':
a.cc:37:26: error: expected ';' before 'cin'
   37 |                 cout<<'#'
      |                          ^
      |                          ;
   38 |                 cin>>str;
      |                 ~~~
Language: C++

#include<iostream>
using namespace std;
int main(){];
	int h,w;
	int i,j;
	cin>>h>>w;
	char m[102][102];
	for(i=1;i<=h;i++){
		for(j=1;j<=w;j++){
			cin>>m[i][j];
		}
	}
	for(i=0;i<=h+1;i++){
		for(j=0;j<=w+1;j++){
			if(i==0||j==0||i==h+1||j==w+1){
				cout<<"#";
			}
			else{
				cout<<m[i][j];
			}
		}
		cout<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:12: error: expected primary-expression before ']' token
    3 | int main(){];
      |            ^
Language: C++

#include<iostream>
using namespace std;
int main(){];
	int h,w;
	int i,j;
	cin>>h>>w;
	char m[102][102];
	for(i=1;i<=h;i++){
		for(j=1;j<=w;j++){
			cin>>m[i][j];
		}
	}
	for(i=0;i<=h+1;i++){
		for(j=0;j<=w+1;j++){
			if(i==0||j==0||i==h+1||j==w+1){
				cout<<"#";
			}
			else{
				cout<<m[i][j];
			}
		}
		cout<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:12: error: expected primary-expression before ']' token
    3 | int main(){];
      |            ^
Language: C++

#include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cassert>
#include <cstddef>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <sstream>
#include <fstream>
#include <chrono>
#include <random>

using namespace std;
#define REP(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int (i) = (a); (i) < (b); (i)++)
#define RREP(i, a) for(int (i) = (a) - 1; (i) >= 0; (i)--)
#define FORR(i, a, b) for(int (i) = (a) - 1; (i) >= (b); (i)--)
#define DEBUG(C) cerr << #C << " = " << C << endl;
using LL = long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<LL>;
using VVL = vector<VL>;
using VD = vector<double>;
using VVD = vector<VD>;
using PII = pair<int, int>;
using PDD = pair<double, double>;
using PLL = pair<LL, LL>;
using VPII = vector<PII>;
template<typename T> using VT = vector<T>;
#define ALL(a) begin((a)), end((a))
#define RALL(a) rbegin((a)), rend((a))
#define SORT(a) sort(ALL((a)))
#define RSORT(a) sort(RALL((a)))
#define REVERSE(a) reverse(ALL((a)))
#define MP make_pair
#define FORE(a, b) for (auto &&a : (b))
#define FIND(s, e) ((s).find(e) != (s).end())
#define EB emplace_back
template<typename T>inline bool chmax(T &a, T b){return (a < b ? a = b, true : false);}
template<typename T>inline bool chmin(T &a, T b){return (a > b ? a = b, true : false);}

const int INF = 1e9;
const int MOD = INF + 7;
const LL LLINF = 1e18;
const long double EPS = 1e-9;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:73:24: error: 'W' was not declared in this scope
   73 |         cout << string(W + 2, '#') << endl;
      |                        ^
a.cc:74:29: error: 'H' was not declared in this scope
   74 |         for (int i = 0; i < H; ++i) {
      |                             ^
Language: C++

#include <iostream>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <complex>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <bitset>
#include <ctime>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cassert>
#include <cstddef>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <sstream>
#include <fstream>
#include <chrono>
#include <random>

using namespace std;
#define REP(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define FOR(i, a, b) for (int (i) = (a); (i) < (b); (i)++)
#define RREP(i, a) for(int (i) = (a) - 1; (i) >= 0; (i)--)
#define FORR(i, a, b) for(int (i) = (a) - 1; (i) >= (b); (i)--)
#define DEBUG(C) cerr << #C << " = " << C << endl;
using LL = long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<LL>;
using VVL = vector<VL>;
using VD = vector<double>;
using VVD = vector<VD>;
using PII = pair<int, int>;
using PDD = pair<double, double>;
using PLL = pair<LL, LL>;
using VPII = vector<PII>;
template<typename T> using VT = vector<T>;
#define ALL(a) begin((a)), end((a))
#define RALL(a) rbegin((a)), rend((a))
#define SORT(a) sort(ALL((a)))
#define RSORT(a) sort(RALL((a)))
#define REVERSE(a) reverse(ALL((a)))
#define MP make_pair
#define FORE(a, b) for (auto &&a : (b))
#define FIND(s, e) ((s).find(e) != (s).end())
#define EB emplace_back
template<typename T>inline bool chmax(T &a, T b){return (a < b ? a = b, true : false);}
template<typename T>inline bool chmin(T &a, T b){return (a > b ? a = b, true : false);}

const int INF = 1e9;
const int MOD = INF + 7;
const LL LLINF = 1e18;
const long double EPS = 1e-9;

int main() {
	int h, w;
	cin >> h >> w;
	vector<string> S(h);
	for (int i = 0; i < h; ++i) {
		cin >> S[i];
	}
	cout << string(W + 1, '#') << endl;
	for (int i = 0; i < H; ++i) {
		cout << "#" << S[i] << "#" << endl;
	}
	cout << string(W + 1, '#') << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:73:24: error: 'W' was not declared in this scope
   73 |         cout << string(W + 1, '#') << endl;
      |                        ^
a.cc:74:29: error: 'H' was not declared in this scope
   74 |         for (int i = 0; i < H; ++i) {
      |                             ^
Language: C++

#include <iostream>
#include<algorithm>
#include <vector>
#include <complex>
#include <map>
using namespace std;

int main() {
	int a,b;
	cin>>a>>b;
	int s[a+1][b+1];
	s[0][0]="#";
	s[a+1][b+1]="#";
	for(int i=1;i<=a;++i){
		for(int j=1;j<=b;++i){
		
		cin>>s[i][j];
		
	}
	}
	for(int i=0;i<a+1;++i){
			for(int j=0;j<b+1;++i){
			
			cout<<s[i][j]<<endl;
			
		}
		}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   12 |         s[0][0]="#";
      |                 ^~~
      |                 |
      |                 const char*
a.cc:13:21: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   13 |         s[a+1][b+1]="#";
      |                     ^~~
      |                     |
      |                     const char*
Language: C++

#include<stdio.h>

int mian(void){

int H,W;
int i,j;
char word[100][100];

scanf("%d %d",&H,&W);

for(i = 0;i <H; i++ ){
for(j =0 ; j<W; j++){
scanf("%c",&word[i][j]);
}

}

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

for(j=0;j<=W+1;j++){

	if(i == 0 || i == H){
		printf("#");

	}else{
		if(j == 0 || j == W+1){
			prinf("*");
		}
		printf("%c",word[i-1][j]);

	}
}
printf("\n");
}




return 0;
}

Compiler output:
a.cc: In function 'int mian()':
a.cc:27:25: error: 'prinf' was not declared in this scope; did you mean 'printf'?
   27 |                         prinf("*");
      |                         ^~~~~
      |                         printf
Language: C

#include<stdio.h>
#define MAX 100
int main()
{

	int x, y;
	int z;
	int i, j;
	int q, r;
	int check=0;
	char str[MAX][MAX];
	q = scanf("%d %d", &x, &y);

	while(check<x)
	{
		r=fscanf(stdin, " ");
		(char *)r = fgets(str[check],sizeof(y),stdin);
		
		if (check < x)
		{
			
			check++;
		}
	}
	/*
	for (i = 0; i < x; i++)
	{
		for (j = 0; j < y; j++)
		{
			printf("%c", str[i][j]);
		}
	}
	*/

	for (i = 0; i < y + 2; i++)
	{
		printf("#");
	}
	printf("\n");

	for (i = 0; i < x; i++)
	{
		printf("#");
		for (j = 0; j < y; j++)
		{
			printf("%c", str[i][j]);
		}
		printf("#\n");
	}

	for (i = 0; i < y + 2; i++)
	{
		printf("#");
	}
	


	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   17 |                 (char *)r = fgets(str[check],sizeof(y),stdin);
      |                 ^
main.c:17:27: error: lvalue required as left operand of assignment
   17 |                 (char *)r = fgets(str[check],sizeof(y),stdin);
      |                           ^
Language: C++

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



Compiler output:
a.cc:4:1: error: expected initializer before 'int'
    4 | int main()
      | ^~~
Language: C++

nums = [int(x) for x in input().split()]

pic = []
for i in range(nums[0]):
	line = input()
	pic.append(line)

for i in range(nums[1]+2):
	print("#", end="")
print("\n", end="")
for words in pic:
	print("#", end="")
	print(words, end="")
	print("#")

for i in range(nums[1]+2):
	print("#", end="")
print("\n", end="")

Compiler output:
a.cc:1:1: error: 'nums' does not name a type
    1 | nums = [int(x) for x in input().split()]
      | ^~~~
Language: C++

//
//  main.cpp
//  B_PictureFrame
//
//  Created by user1 on 2017/05/20.
//  Copyright © 2017年 user1. All rights reserved.
//

#include <iostream>
int H, W;
char a[100+ 2][100 + 2];

void init(){
    for(int h = 0; h<100+2; h++){
        for(int w=0; w<100+2; w++){
            a[h][w] = '0';        }
    }
}

void input(){
    std::cin >> H;
    std::cin >> W;
    
    //入力
    std::string buff;
    int ind = 0;
    //読み捨て
    std::getline(std::cin, buff);
    while(std::cin){
        getline(std::cin, buff);
        //Char array's index is offset +1 for head "#".
        strcpy(&(a[ind+1][1]), buff.c_str());
        if(ind >= H) break;
        ind ++;
        
    }
}

void solve(){
    //add "#" head and tail.
    for(int i=0; i<W+2; i++){
        a[0][i] = '#';
        a[H+1][i] = '#';
    }
    
    for(int i=0; i<H+2; i++){
        a[i][0] = '#';
        a[i][W+1] = '#';
    }
}

void show(){
    for(int h = 0; h<H+2; h++){
        for(int w=0; w<W+2; w++){
            printf("%c ", a[h][w]);
        }printf("\n");
    }
}

int main(int argc, const char * argv[]) {
    // insert code here...
    init();
    input();
    //show();
    solve();
    show();
    return 0;
}


Compiler output:
a.cc: In function 'void input()':
a.cc:32:9: error: 'strcpy' was not declared in this scope
   32 |         strcpy(&(a[ind+1][1]), buff.c_str());
      |         ^~~~~~
a.cc:10:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    9 | #include <iostream>
  +++ |+#include <cstring>
   10 | int H, W;
Language: C++

#include<cstdio>
int main()
{
    char a[100][100];
    int H,W;
    while (scanf("%d %d",&H,&W)==2)
    {
        getchar();
        for (int i=1;i<=H;i++)
        {
            gets(a[i]);
        }
        for (int i=0;i<=H+1;i++)
        {
            for (int j=0;j<=W+1;j++)
            {
                if (i==0||j==0||i==H+1||j==W+1)printf("#");
                else printf("%c",a[i][j-1]);
            }
            printf("\n");
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: 'gets' was not declared in this scope; did you mean 'getw'?
   11 |             gets(a[i]);
      |             ^~~~
      |             getw