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

#include <stdio.h>

{
	int H, W;
	int h, w;

	while (1) {
		scanf("%d%d", &H, &W);
		if (H == 0 && W == 0) break;
		
		for (w = 0; w < W; w++) putchar('#');
		putchar('\n');

		for (h = 2; h < H; h++) {
			putchar('#');
			for (w = 2; w < W; w++) putchar('.');
			putchar('#');
			putchar('\n');
		}

		for (w = 0; w < W; w++) putchar('#');
		putchar('\n');

		putchar('\n');
	}
	return 0;
}



Compiler output:
main.c:3:1: error: expected identifier or '(' before '{' token
    3 | {
      | ^
Language: C

#include <stdio.h>

int main(){

int h, w;
int x, y;
char c;

while (1){
scanf("%d %d", &h, &w);

if (h == 0 && w == 0) break;

for  (y = 0; y < h; y++ ){
	for (x = 0; x < w; x++){
		if (y == 1 || y == h || x == 1 || x == w){
			char = "#"}
		else{
			char = "."}
		printf("%c", c);}
		printf("\n");
			}
		printf("\n"); 
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:30: error: expected identifier or '(' before '=' token
   17 |                         char = "#"}
      |                              ^
main.c:18:17: error: expected '}' before 'else'
   18 |                 else{
      |                 ^~~~
main.c:19:30: error: expected identifier or '(' before '=' token
   19 |                         char = "."}
      |                              ^
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
Language: C

#include <stdio.h>

int main(){

int h, w;
int x, y;
char c;

while (1){
scanf("%d %d", &h, &w);

if (h == 0 && w == 0) break;

for  (y = 0; y < h; y++ ){
	for (x = 0; x < w; x++){
		if (y == 1 || y == h || x == 1 || x == w){
			char = "#";}
		else{
			char = ".";}

		printf("%c", c);}
		printf("\n");
			}
		printf("\n"); 
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:30: error: expected identifier or '(' before '=' token
   17 |                         char = "#";}
      |                              ^
main.c:19:30: error: expected identifier or '(' before '=' token
   19 |                         char = ".";}
      |                              ^
Language: C

#include <stdio.h>

int main(){

int h, w;
int x, y;
char c;

while (1){
scanf("%d %d", &h, &w);

if (h == 0 && w == 0) break;

for  (y = 0; y < h; y++ ){
	for (x = 0; x < w; x++){
		if (y == 1 || y == h || x == 1 || x == w) char = '#';
		else char = '.';

		printf("%c", c);}
		printf("\n");
			}
		printf("\n"); 
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:59: error: expected expression before 'char'
   16 |                 if (y == 1 || y == h || x == 1 || x == w) char = '#';
      |                                                           ^~~~
main.c:17:22: error: expected expression before 'char'
   17 |                 else char = '.';
      |                      ^~~~
Language: C

import java.util.Scanner;
class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		while(true){
			int h = scan.nextInt();
			int w = scan.nextInt();
			if(h == 0 && w == 0){
				break;
			}
			for(int i = 0; i < h; i++){
				for(int j = 0; j < w; j++){
					if(i == 0 || j == 0 || i == h - 1 || j == w - 1){
						System.out.print("#");
					}
					else{
						System.out.print(".");
					}
				}System.out.println();
			}System.out.println();
		}
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:2:1: error: unknown type name 'class'
    2 | class Main{
      | ^~~~~
main.c:2:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    2 | class Main{
      |           ^
Language: C

#include <iostream>


using namespace std;

int main(){
	int H, W;

	while (1){
		cin >> H >> W;
		if (H == 0 && W == 0) break;
		for (int i = 0; i < H; i++){
			for (int j = 0; j < W; j++){
				if (i == 0 || i == H - 1 || j == 0 || j == W - 1){
					cout << "#";
				}
				else {
					cout << ".";
				}
			}
			cout << endl;
		}
		cout << endl;

	}

	return 0;
}

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

#include <stdio.h>
int main(){
	int i, j, H, W;
	for(;;){
		scanf("%d %d",&H ,&W);
		if(H == 0 && W == 0)break;
		for ( i = 0; i < H; i++ ){
			for ( j = 0; j < W; j++ ){
				if(){
					printf(".");
				} else {
					printf("#");
				}
			}
			printf("\n");
}
		return 0;
	}

Compiler output:
main.c: In function 'main':
main.c:9:36: error: expected expression before ')' token
    9 |                                 if(){
      |                                    ^
main.c:18:9: error: expected declaration or statement at end of input
   18 |         }
      |         ^
Language: C

#include <stdio.h>
int main(){
	int i, j, H, W;
	for(;;){
		scanf("%d %d",&H ,&W);
		if(H == 0  && W == 0)break;
		for ( i = 0; i < H; i++ ){
			for ( j = 0; j < W; j++ ){
				if(){
					printf(".");
				} else {
					printf("#");
				}
			}
			printf("\n");
}
		return 0;
	}
	

Compiler output:
main.c: In function 'main':
main.c:9:36: error: expected expression before ')' token
    9 |                                 if(){
      |                                    ^
main.c:18:9: error: expected declaration or statement at end of input
   18 |         }
      |         ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	int a=1,b=1;
	while(!(a==0&&b==0)){
		cin >> a >> b;
		for (int i=1;i<=a;i++){
			for(int j=1;j<=b;j++)
				if (i==1||i==x||j==1||j==y)
					cout << '#';
				else
					cout << '.';
			cout << endl;
		}
		if(!(a==0&&b==0))
			cout << endl;
	}
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:46: error: 'x' was not declared in this scope
    9 |                                 if (i==1||i==x||j==1||j==y)
      |                                              ^
a.cc:9:58: error: 'y' was not declared in this scope
    9 |                                 if (i==1||i==x||j==1||j==y)
      |                                                          ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a = 1, b = 1, i = 1;
	while ((a != 0)||(b != 0)){
		if (i != 1)
			cout << endl;
		i++;
		cin >> a >> b;
		if ((a != 0)||(b != 0))
			for (int i = 1; i <= a; i++){
				for (int j = 1; j <= b; j++){
					if ((i == 1)||(j == 1)
						cout << '#'
						else cout << '.'
				}
				cout << endl;
			}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:63: error: expected ')' before 'cout'
   14 |                                         if ((i == 1)||(j == 1)
      |                                            ~                  ^
      |                                                               )
   15 |                                                 cout << '#'
      |                                                 ~~~~           
a.cc:17:33: error: expected primary-expression before '}' token
   17 |                                 }
      |                                 ^
Language: C++

#include <cstdio>

void printFrame(int x, int y) {
    int i, j;
    for(i=0;i<y;i++) printf("#");
    printf("\n");
    for(i=2;i<x;i++) {
        printf("#");
        for(i=2;i<y;i++) printf(".");
        printf("#\n");
    }
    for(i=0;i<y;i++) printf("#");
    printf("\n");
}

int main() {
    int x=-1, y=-1;
    for(;;) {
        scanf("%d %d", &x, %y);
        if (x==0 && y==0) break;
        printFrame(x, y);
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:28: error: expected primary-expression before '%' token
   19 |         scanf("%d %d", &x, %y);
      |                            ^
Language: C++

#include <iostream>
using namespace std;

using ll = long long;

#define for_(i,a,b) for(int i = (a);i < (b);i++)
#define rfor_(i,a,b) for(int i = (b)-1;i >= (a);i--)
#define rep(i,n) for_(i,0,(n))
#define rrep(i,n) rfor_(i,0,(n))

int H, W;

int main(){
	cin.tie(0);
	
	while(cin>>H>>W,H||W) {
	    rep(i, H) {
	        rep(j, W) {
	            if(i==0||j==0)cout<<'#';
	            else (i==H-1||j==W-1)cout<<'#';
	            else cout<<'.';
	        }
	        cout<<endl;
	    }
	    cout<<endl;
	}

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:42: error: expected ';' before 'cout'
   20 |                     else (i==H-1||j==W-1)cout<<'#';
      |                                          ^~~~
      |                                          ;
a.cc:21:21: error: 'else' without a previous 'if'
   21 |                     else cout<<'.';
      |                     ^~~~
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;

 int main(){
	 int x,y,i,j;
	 while(1){
		 cin >> x >>y;
		 if(x==0&&y==0){
			 break;
		 }
		 for(i=0;i<x;i++){
			 for(j=0;j<y;j++){
				if(){
					printf(".");
				}else{
					printf("#");
				}
			 }
			printf("\n")
		 }
		 cout<<endl;
	 }
	 return 0;


 }



Compiler output:
a.cc: In function 'int main()':
a.cc:14:36: error: expected primary-expression before ')' token
   14 |                                 if(){
      |                                    ^
a.cc:20:37: error: expected ';' before '}' token
   20 |                         printf("\n")
      |                                     ^
      |                                     ;
   21 |                  }
      |                  ~
Language: C++

#include <iostream>
using namespace std;

int main(){
    int H, W;
    cin >> H >> W;
    while((H!=0)||(W!=0)){
        for(int i=0; i<H-2; i++){
            cout << "#";
            for(int j=0; j<W-2; j+){
                cout << ".";
            }
            cout << "#" << endl;
        }
        cout << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:35: error: expected primary-expression before ')' token
   10 |             for(int j=0; j<W-2; j+){
      |                                   ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int H,W;
    cin>>H,W;
    
    cout <<"" << endl;
    }
    return 0;
}


Compiler output:
a.cc:10:5: error: expected unqualified-id before 'return'
   10 |     return 0;
      |     ^~~~~~
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int H,W;
    cin>>H,W;
    
    cout <<"H,W" << endl;
    }
    return 0;
}


Compiler output:
a.cc:10:5: error: expected unqualified-id before 'return'
   10 |     return 0;
      |     ^~~~~~
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int H,W;
    cin>>H,W>>end1;
    
    cout <<"H,W" << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'end1' was not declared in this scope
    6 |     cin>>H,W>>end1;
      |               ^~~~
a.cc: At global scope:
a.cc:10:5: error: expected unqualified-id before 'return'
   10 |     return 0;
      |     ^~~~~~
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int h,w;
  while(cin>>h>>w&&h&&w){
    for(int i=1;i<=h;++i){
      for(int j=1;j<=w;++j){
	if(i==1||i==h||j==1||j==w) cout<<"#";
	else cout<<"."
      }
      cout<<endl;
    }
    cout<<endl;
  }
  return 0;
}


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

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expected ';' before 'for'
   10 |         cin >> H >> W
      |                      ^
      |                      ;
   11 | 
   12 |         for(int i=1;i<=H;i++)
      |         ~~~           
a.cc:12:21: error: 'i' was not declared in this scope
   12 |         for(int i=1;i<=H;i++)
      |                     ^
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expected ';' before 'for'
   10 |         cin >> H >> W
      |                      ^
      |                      ;
   11 | 
   12 |         for(int i=1;i<=H;i++)
      |         ~~~           
a.cc:12:21: error: 'i' was not declared in this scope
   12 |         for(int i=1;i<=H;i++)
      |                     ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
    int H,W;
    
    while(H!=0&&W!=0)
    {
        cin >> H >> W
        
        for(int i=0;i<=H-1;i++)
        {
            cout << "#";
            for(int j=0;j<=W-3;j++)
            {
                if(i==1||i==W-3)
                {
                    cout << "#";
                }
                else
                {
                    cout << ends;
                }
            }
            cout << "#" << endl;
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: expected ';' before 'for'
   10 |         cin >> H >> W
      |                      ^
      |                      ;
   11 | 
   12 |         for(int i=0;i<=H-1;i++)
      |         ~~~           
a.cc:12:21: error: 'i' was not declared in this scope
   12 |         for(int i=0;i<=H-1;i++)
      |                     ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int h,w;
    do
    {
        cin >> h >> w;
        for(int i=0;i<h;i++)
        {
            for(int j=0;j<w;j++)
            {
                if(i>1&&i<h)
                {
                    if(j>1&&j<w)
                    {
                        printf(".");
                    }
                    else
                    {
                        printf("#");
                    }
                }
                printf("#");
            }
        }
    }while(h>=3&&h>=3)
}



Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: expected ';' before '}' token
   27 |     }while(h>=3&&h>=3)
      |                       ^
      |                       ;
   28 | }
      | ~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int h,w;
    do
    {
        cin >> h >> w;
        for(int i=0;i<h;i++)
        {
            for(int j=0;j<w;j++)
            {
                if(i>1&&i<h)
                {
                    if(j>1&&j<w)
                    {
                        cout << ".";
                    }
                    else
                    {
                        cout << "#";
                    }
                }
                cout << "#" << endl;
            }
        }
    }while(h>=3&&h>=3)
}



Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: expected ';' before '}' token
   27 |     }while(h>=3&&h>=3)
      |                       ^
      |                       ;
   28 | }
      | ~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int h=3,w=3;
    while(h>=3&&h>=3)
    {
        cin >> h >> w;
        for(int i=0;i<h;i++)
        {
            for(int j=0;j<w;j++)
            {
                if(i>1&&i<h)
                {
                    if(j>1&&j<w)
                    {
                        cout << ".";
                    }
                    else
                    {
                        cout << "#";
                    }
                }
                cout << "#" << endl;
            }
        }
    }while(h>=3&&h>=3)
}



Compiler output:
a.cc: In function 'int main()':
a.cc:28:1: error: expected primary-expression before '}' token
   28 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
void main()
{
    int h=3,w=3;
    while(h>=3&&h>=3)
    {
        cin >> h >> w;
        for(int i=0;i<h;i++)
        {
            for(int j=0;j<w;j++)
            {
                if(i>1&&i<h)
                {
                    if(j>1&&j<w)
                    {
                        cout << ".";
                    }
                    else
                    {
                        cout << "#";
                    }
                }
                cout << "#" << endl;
            }
        }
    }while(h>=3&&h>=3)
}



Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:28:1: error: expected primary-expression before '}' token
   28 | }
      | ^
Language: C++

#include<stdio.h>

int main(){
    int h,w;
    while(scanf("%d %d",h,w) && (h != 0 || w != 0)){
        for(int i=0;i < h;i++){
            print("#");
            for(int j=0;i < h -2 ;j++){
                print(".")
            }
            print("#"\n);
        }
        print("\n");
    }
    return 0;
}


Compiler output:
a.cc:11:22: error: stray '\' in program
   11 |             print("#"\n);
      |                      ^
a.cc: In function 'int main()':
a.cc:7:13: error: 'print' was not declared in this scope; did you mean 'printf'?
    7 |             print("#");
      |             ^~~~~
      |             printf
a.cc:11:22: error: expected ')' before 'n'
   11 |             print("#"\n);
      |                  ~   ^~
      |                      )
a.cc:13:9: error: 'print' was not declared in this scope; did you mean 'printf'?
   13 |         print("\n");
      |         ^~~~~
      |         printf
Language: C++

#include<stdio.h>

int main(){
    int h,w;
    while(scanf("%d %d",h,w) && (h != 0 || w != 0)){
        for(int i=0;i < h;i++){
            printf("#");
            for(int j=0;i < h -2 ;j++){
                printf(".")
            }
            printf("#"\n);
        }
        printf("\n");
    }
    return 0;
}


Compiler output:
a.cc:11:23: error: stray '\' in program
   11 |             printf("#"\n);
      |                       ^
a.cc: In function 'int main()':
a.cc:9:28: error: expected ';' before '}' token
    9 |                 printf(".")
      |                            ^
      |                            ;
   10 |             }
      |             ~               
a.cc:11:23: error: expected ')' before 'n'
   11 |             printf("#"\n);
      |                   ~   ^~
      |                       )
Language: C++

#include<stdio.h>

int main(){
    int h,w;
    while(scanf("%d %d",h,w) && (h != 0 || w != 0)){
        for(int i=0;i < h;i++){
            printf("#");
            for(int j=0;i < h -2 ;j++){
                printf(".")
            }
            printf("#\n");
        }
        printf("\n");
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: expected ';' before '}' token
    9 |                 printf(".")
      |                            ^
      |                            ;
   10 |             }
      |             ~
Language: C++

#include<iostream>
using namespace std;

int main(){
int H, W;
while(1){
  cin >> H >> W;
  if(H == 0 && W == 0) break;
  for(int i = 0; i < H; i++){
   for(int j = 0; j < W; j++){
    if(j == 0 || j = W-1){
      cout << ".";
    }else {
    cout << '#';
    }
   cout << endl;
  }
  cout << endl;
 }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: lvalue required as left operand of assignment
   11 |     if(j == 0 || j = W-1){
      |        ~~~~~~~^~~~
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
int H, W;
while(1){
  cin >> H >> W;
  if(H == 0 && W == 0) break;
  for(int j = 0; j < W; j++){
    cout << '#';
  for(int i = 1; i < H-1; i++){
    for(int j = 0; j < W; j++){
      if(j == 0 || j = W-1){
         cout << '#';
      }else{
         cout << '.';
      }
     cout << endl;
     }
  for(int j = 0; j < W; j++){
    cout << '#';
  cout << endl;
 }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: lvalue required as left operand of assignment
   13 |       if(j == 0 || j = W-1){
      |          ~~~~~~~^~~~
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:9:29: note: to match this '{'
    9 |   for(int j = 0; j < W; j++){
      |                             ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:6:9: note: to match this '{'
    6 | while(1){
      |         ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int H, W;while(1){
  cin >> H >> W;
    if(H == 0 && W == 0) break;
      for(int j = 0; j < W; j++){
         cout << '#';
      }
    for(int i = 1; i < H-1; i++){
      for(int j = 0; j < W; j++){
         if(j == 0 || j = W-1){
            cout << '#';
         }else{
            cout << '.';
         }
         cout << endl;
        }
    for(int j = 0; j < W; j++){
    cout << '#';
   }
  cout << endl;
 }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: lvalue required as left operand of assignment
   13 |          if(j == 0 || j = W-1){
      |             ~~~~~~~^~~~
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int H, W;while(1){
  cin >> H >> W;
    if(H == 0 && W == 0) break;
      for(int j = 0; j < W; j++){
         cout << '#';
      }
    for(int i = 1; i < H-1; i++){
      for(int j = 0; j < W; j++){
         if(j == 0 || j == W-1){
            cout << '#';
         }else{
            cout << '.';
         }
         cout << endl;
        }
    for(int j = 0; j < W; j++){
    cout << '#';
   }
  cout << endl;
 }
return 0;
}


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

#include<iostream>
using namespace std;
int main() {
    int H, W;
    while (1) {
        cin >> H >> W;
        for (int i=0; i < H; i++) {
            if (i==0 | i==H) {
                for (int j=0; j < W; j++) {
                    cout << "#";
            } else {
                cout << "#"
                for (int j=2; j < W; j++) {
                    cout << "-";
                }
                cout << "#";
            }
            cout << endl;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected '}' before 'else'
   11 |             } else {
      |               ^~~~
a.cc:8:30: note: to match this '{'
    8 |             if (i==0 | i==H) {
      |                              ^
a.cc:12:28: error: expected ';' before 'for'
   12 |                 cout << "#"
      |                            ^
      |                            ;
   13 |                 for (int j=2; j < W; j++) {
      |                 ~~~         
a.cc:13:31: error: 'j' was not declared in this scope
   13 |                 for (int j=2; j < W; j++) {
      |                               ^
a.cc: At global scope:
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main() {
    int H, W;
    while (1) {
        cin >> H >> W;
        if (H==0 && W==0) break;
        for (int i=0; i < H; i++) {
            if (i==1 | i==H) {
                for (int j=0; j < W; j++) {
                    cout << "#";
                }
            } else {
                cout << "#"
                for (int j=2; j < W; j++) {
                    cout << "-";
                }
                cout << "#";
            }
            cout << endl;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before 'for'
   14 |                 cout << "#"
      |                            ^
      |                            ;
   15 |                 for (int j=2; j < W; j++) {
      |                 ~~~         
a.cc:15:31: error: 'j' was not declared in this scope
   15 |                 for (int j=2; j < W; j++) {
      |                               ^
a.cc: At global scope:
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main() {
    int H, W;
    while (1) {
        cin >> H >> W;
        if (H==0 && W==0) break;
        for (int i=0; i < H; i++) {
            if (i==1 | i==H) {
                for (int j=0; j < W; j++) {
                    cout << "#";
                }
            } else {
                cout << "#"
                for (int k=2; k < W; k++) {
                    cout << "-";
                }
                cout << "#";
            }
            cout << endl;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before 'for'
   14 |                 cout << "#"
      |                            ^
      |                            ;
   15 |                 for (int k=2; k < W; k++) {
      |                 ~~~         
a.cc:15:31: error: 'k' was not declared in this scope
   15 |                 for (int k=2; k < W; k++) {
      |                               ^
a.cc: At global scope:
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main() {
    int H, W;
    while (1) {
        cin >> H >> W;
        if (H==0 && W==0) break;
        for (int i=0; i < H; i++) {
            if (i==1 | i==H) {
                for (int j=0; j < W; j++) {
                    cout << "#";
                }
            } else {
                cout << "#";
                for (int k=2; k < W; k++) {
                    cout << "-";
                }
                cout << "#";
            }
            cout << endl;
            }
        }
    }
}


Compiler output:
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
 while(1){
 int H, W;
 if(H == 0 && W == 0) break;
 cin >> H >> W;

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

 for ( int i = 1; i < H-1; i++ ){
    for ( int j = 0; j < W; j++ ){
        if(j == 0 || j == W-1){
            cout << "#";
        } else {
            cout << ".";
        }
    }
   
    cout << endl;
  }
 for(int i = 0; i < W; i ++){
      cout << "#";
    }
 cout << endl;
 cout << endl;
 }
ret


Compiler output:
a.cc: In function 'int main()':
a.cc:32:1: error: 'ret' was not declared in this scope
   32 | ret
      | ^~~
a.cc:32:4: error: expected '}' at end of input
   32 | ret
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <stdio.h>

int main(void)
{
	int i, j, H, W;
	while(1)
	{
		scanf("%d %d\n", &H, &W);
		if(H==0&&W==0)
		{
			break;
		}
		for(i=1; i<=H; i++)
		{
			for(j=1; j<=W; j++)
			{
				if(i=1||i=H)
				{
					printf("#");
				}
				if(j!=1||j!=H)
				{
					printf(".");
				}
			}
		printf("\n");
		}
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:39: error: lvalue required as left operand of assignment
   17 |                                 if(i=1||i=H)
      |                                      ~^~~
Language: C++

#include <stdio.h>

int main(void)
{
	int i, j, H, W;
	while(1)
	{
		scanf("%d %d\n", &H, &W);
		if(H==0&&W==0)
		{
			break;
		}
		for(i=1; i<=H; i++)
		{
			for(j=1; j<=W; j++)
			{
				if(i=1||i=H)
				{
					printf("#");
				}
				if(j!=1||j!=H)
				{
					printf(".");
				}
			}
		printf("\n");
		}
	printf("\n");
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:39: error: lvalue required as left operand of assignment
   17 |                                 if(i=1||i=H)
      |                                      ~^~~
Language: C++

#include <stdio.h>

int main(void)
{
	int i, j, H, W;
	while(1)
	{
		scanf("%d %d\n", &H, &W);
		if(H==0&&W==0)
		{
			break;
		}
		for(i=1; i<=H; i++)
		{
			for(j=1; j<=W; j++)
			{
				if(i=1||i=H)
				{
					printf("#");
				}
				else if(j!=1||j!=H)
				{
					printf(".");
				}
				else
				{
					printf("#");
				}
			}
		printf("\n");
		}
	printf("\n");
	}
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:39: error: lvalue required as left operand of assignment
   17 |                                 if(i=1||i=H)
      |                                      ~^~~
Language: C++

#include <stdio.h>

int main(void)
{
	int i, j, H, W;
	while(1)
	{
		scanf("%d %d\n", &H, &W);
		if(H==0&&W==0)
		{
			break;
		}
		for(i=1; i<=H; i++)
		{
			for(j=1; j<=W; j++)
			{
				if(i=1||i=H)
				{
					printf("#");
				}
				else if(j!=1||j!=H)
				{
					printf(".");
				}
			}
		}
	printf("\n");
	}
	
	return 0;
}#i


Compiler output:
a.cc:31:2: error: stray '#' in program
   31 | }#i
      |  ^
a.cc: In function 'int main()':
a.cc:17:39: error: lvalue required as left operand of assignment
   17 |                                 if(i=1||i=H)
      |                                      ~^~~
a.cc: At global scope:
a.cc:31:3: error: 'i' does not name a type
   31 | }#i
      |   ^
Language: C++

#include<stdio.h>

int main(void)
{
	int H, W, i, j;
	while(1)
	{
		scanf("%d %d", &H, &W);
		if(H==0||W==0)
		{
			break;
		}
		for(i=1; i<=H; i++)
		{
			for(j=1; j<=W; j++)
			{
				if(i==1||i==H)
				{
					printf("#");
				}
				if(2<=i<=H-1)
				{
					if(j==1||j==W)
					{
						printf("#");
					}
					else
					{
						printf(".");
					}
			printf("\n");
			}
		}
		printf("\n");
	}
	
	return 0;
}


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

#include <iostream>
using namespace std;
int main(){
    int H,W;
    int i=0;
    while(1){
        cin>>H>>W;
        if(H==0&&W==0){
            break;
        }
        for(int n=1;n<=H;n++){
            for(int i=1;i<=W;i++){
                if(n==1){
                    cout<<"#";
                }
                else{
                    if(i==1){
                        cout<<"#";
                    }
                    else{
                        cout<<".";
                    }
                    else if(i==W){
                        cout<<"#";
                    }
                }
                else if(n==H){
                    cout<<"#";
                }
            }
            cout<<endl;
        }
        cout<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:21: error: 'else' without a previous 'if'
   23 |                     else if(i==W){
      |                     ^~~~
a.cc:27:17: error: 'else' without a previous 'if'
   27 |                 else if(n==H){
      |                 ^~~~
Language: C++

int main()
{
	int H, W;
	int h, w;
	cin >> H >> W;
	if (H == 0 && W == 0) {
		return 0;
	}
	for (int i = 1; i <= W; i++) {
		cout << "#";
	}
	cout << endl;
	h = H - 2;
	w = W - 2;
	for (int i = 1; i <= h; i++) {
		cout << "#";
		for (int i = 1; i <= w; i++) {
			cout << "."; 
		}
		cout << "#" << endl;
	}
	for (int i = 1; i <= W; i++) {
		cout << "#";
	}cout << endl;

	cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> H >> W;
      |         ^~~
a.cc:10:17: error: 'cout' was not declared in this scope
   10 |                 cout << "#";
      |                 ^~~~
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << endl;
      |         ^~~~
a.cc:12:17: error: 'endl' was not declared in this scope
   12 |         cout << endl;
      |                 ^~~~
Language: C++

 int H,W,i,j;
  while(true){
      cin>>H>>W;
  for(i=1;i<=H;i++){
   for( j=1;j<=W;j++){
       if(i==1){
           cout<<"#";
       }
       else if(j==1){
           cout<<"#";
       }
       else if(i==H){
           cout<<"#";
       }
       else if(j==W){
           cout<<"#";
       }
       else{
           cout<<".";
       }


   }
    cout<<endl;
  }
  }


Compiler output:
a.cc:2:3: error: expected unqualified-id before 'while'
    2 |   while(true){
      |   ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int H, W;
  while(true) {
    cin >> H >> W;
    if (H == 0 && W == 0) {
      break;
    }
    for(int j = 0; j < W; j++) {
        cout << '#';
    }
    for(int i = ; i < H-1; i++) {
      cout << '#'
      for(int j = 1; j < W-1; j++) {
        cout << '.';
      }
      cout << '#' << endl;
    }
    for(int j = 0; j < W; j++) {
      cout << '#';
    }
    cout << endl << endl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected primary-expression before ';' token
   15 |     for(int i = ; i < H-1; i++) {
      |                 ^
a.cc:16:18: error: expected ';' before 'for'
   16 |       cout << '#'
      |                  ^
      |                  ;
   17 |       for(int j = 1; j < W-1; j++) {
      |       ~~~         
a.cc:17:22: error: 'j' was not declared in this scope
   17 |       for(int j = 1; j < W-1; j++) {
      |                      ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int H, W;
  while(true) {
    cin >> H >> W;
    if (H == 0 && W == 0) {
      break;
    }
    for(int j = 0; j < W; j++) {
        cout << '#';
    }
    cout <<  endl;
    for(int i = ; i < H-1; i++) {
      cout << '#';
      for(int j = 1; j < W-1; j++) {
        cout << '.';
      }
      cout << '#' << endl;
    }
    for(int j = 0; j < W; j++) {
      cout << '#';
    }
    cout << endl << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: expected primary-expression before ';' token
   16 |     for(int i = ; i < H-1; i++) {
      |                 ^
Language: C++

module Main where

import Control.Applicative
import Numeric

main :: IO ()
main = loop

loop :: IO ()
loop = do
  {[h, w] <- getInts
  ; if h == 0 && w == 0 then done
    else do
      { putStr $ unlines $ frame h w
      ; loop
      }
  }
  
tedge :: Int -> String
tedge n = replicate n '#'

mbody :: Int -> String
mbody n = case n of
            0 -> ""
            1 ->"#"
            _ ->"#" ++ replicate (n-2) '.' ++ "#"

frame :: Int -> Int -> [String]
frame h w = case h of
          0 -> []
          1 -> [tedge w]
          _ -> [tedge w] ++ replicate (h-2) (mbody w) ++ [tedge w]

  --

getInts :: IO [Int]
getInts = map read . words <$> getLine 

putInts :: [Int] -> IO ()
putInts = putStrLn . unwords . map show

getDoubles :: IO [Double]
getDoubles = map read . words <$> getLine

putDoubles :: [Double] -> IO ()
putDoubles = putStrLn . unwords . map showDouble

showDouble :: Double -> String
showDouble d = showFFloat Nothing d ""

done :: IO ()
done = return ()



Compiler output:
a.cc:1:1: error: 'module' does not name a type
    1 | module Main where
      | ^~~~~~
a.cc:1:1: note: C++20 'module' only available with '-fmodules-ts'
a.cc:19:1: error: 'tedge' does not name a type
   19 | tedge :: Int -> String
      | ^~~~~
Language: C++

#include<iostream>

using namespace std;

int main() {
	int i, j, W, H;
	while (cin >> H >> W, H || W){
		for (i = 1; i <= H; i++){
			for (j = 1; j <= W; j++){
			    if(j = 1) 
                                         cout << "#";
                                 else if(j = W)
                                         cout << "#"
                                 else 
                                         cout << "."
			}
			cout << endl;
		}
          cout << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:53: error: expected ';' before 'else'
   13 |                                          cout << "#"
      |                                                     ^
      |                                                     ;
   14 |                                  else
      |                                  ~~~~
Language: C++

#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
	int H, W;
	int i, j;

	while (1)　{
		cin >> H >> W;
		if (H == 0 && W == 0) break;
		for (i = 0; i < H; i++) {
			for (j = 0; j < W; j++) {
				if (0 < j && j < W - 1 && 0 < i && i < H - 1) {
					cout << '.';
					continue;
				}
				cout << '#';
			}
			cout << endl;
		}
		cout << endl;
	}

	return (0);
}

Compiler output:
a.cc:11:18: error: extended character 　 is not valid in an identifier
   11 |         while (1)　{
      |                  ^
a.cc: In function 'int main()':
a.cc:11:18: error: '\U00003000' was not declared in this scope
   11 |         while (1)　{
      |                  ^~
Language: C++

#include <stdio.h>
int main(){
int h,w;
while(1){
scanf("%d",&h);scanf("%d",&w);
if(h==0&&w==0)break;

for(int i=1;i<=h;i++)
{

for(int k=1;k<=w;k++)
{
if(i==1)printf("#");
else if(i<h){
if(k==1)printf("#");
else if(k<=)printf(".");
}
else if(i==h)printf("#");

}
printf("\n");
}
printf("\n");
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: expected primary-expression before ')' token
   16 | else if(k<=)printf(".");
      |            ^
Language: C++

#include <iostream>

using namespace std;

void print_char_line(const int n, const char edge, const char inside)
{
    cout << edge;
    for (int i = 0; i < n - 2; ++i)
    {
        cout << inside;
    }
    cout << edge;
}

print_frame(const int height, const int width)
{
    print_char_line(width, '#', '#');
    for (int i = 0; i < height - 2; ++i)
    {
        print_char_line(width, '#', '.');
    }
    print_char_line(width, '#', '#');
}

int main()
{
    int a, b;
    while (cin >> a >> b, a != 0 || b != 0)
    {
        print_frame(a, b);
        cout << endl;
    }
    return 0;
}

Compiler output:
a.cc:15:1: error: ISO C++ forbids declaration of 'print_frame' with no type [-fpermissive]
   15 | print_frame(const int height, const int width)
      | ^~~~~~~~~~~
a.cc: In function 'int print_frame(int, int)':
a.cc:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
   23 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
    int h,w;
    cin >> h >> w;
    while(!(h == 0 && w == 0)){
        for(int i = 0; i < a; i++){
            for(int j = 0; j < b; j++){
                if((i == 0 || i == a - 1) || (j == 0 || j == b - 1)){
                    cout << "#";
                }else{
                    cout << ".";
                }
                cout << endl;
            }
            cout << endl;
       }
       cin >> h >> w;
   }
   return 0;
}

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

#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

int main(){
	int H,W;
	while(1){
		cin >> H >> W;
		REP(i,H){
			REP(j,W){
				if((i==0||i==H-1)&&((j!=0&&j!=W-1) cout << ".";
				else cout << "#";
			}
			cout << endl;
		}
		cout << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:67: error: expected ')' before 'cout'
   32 |                                 if((i==0||i==H-1)&&((j!=0&&j!=W-1) cout << ".";
      |                                                    ~              ^~~~~
      |                                                                   )
a.cc:32:79: error: expected ')' before ';' token
   32 |                                 if((i==0||i==H-1)&&((j!=0&&j!=W-1) cout << ".";
      |                                   ~                                           ^
      |                                                                               )
Language: C++

#include <iostream>
using namespace std;

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

  if (h == 0 && w == 0) {
    break;
  } 
  for (int i = 0;i < h; i++) {
   for (int j = 0; j < w; j++) {
    cout <<'#';
   }
   cout <<endl;
  } 

 }

 return 0;
}

Compiler output:
a.cc:21:2: error: expected unqualified-id before 'return'
   21 |  return 0;
      |  ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

v#include <iostream>
//#include <stdio.h>
using namespace std;

int main(){
	int H, W;
	while(1){
		cin >> H >> W;
		if (H == 0 && W ==0)  break;
		for (int i=0;i < H;i++){
			for (int j=0; j<W; j++){
				if (i != 0 && i != H-1 && j != 0 && j != W-1 ) cout << ".";
				else cout << "#";
			}
			cout << endl ;
		}
		cout << endl ;
	}
	return 0;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <iostream>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <iostream>
      | ^
a.cc: In function 'int main()':
a.cc:8:17: error: 'cin' was not declared in this scope
    8 |                 cin >> H >> W;
      |                 ^~~
a.cc:12:80: error: 'cout' was not declared in this scope
   12 |                                 if (i != 0 && i != H-1 && j != 0 && j != W-1 ) cout << ".";
      |                                                                                ^~~~
a.cc:13:38: error: 'cout' was not declared in this scope
   13 |                                 else cout << "#";
      |                                      ^~~~
a.cc:15:25: error: 'cout' was not declared in this scope
   15 |                         cout << endl ;
      |                         ^~~~
a.cc:15:33: error: 'endl' was not declared in this scope
   15 |                         cout << endl ;
      |                                 ^~~~
a.cc:17:17: error: 'cout' was not declared in this scope
   17 |                 cout << endl ;
      |                 ^~~~
a.cc:17:25: error: 'endl' was not declared in this scope
   17 |                 cout << endl ;
      |                         ^~~~
Language: C++

#include<iostream>
 
int main(){
    int h;
    int w;
 
    while(true){
        std::cin>>h;
        std::cin>>w;
        if(h==0&&w==0){
            break;
        }
        for(int i=0;i<h;i++){
            for(int j=0;j<w;j++){
                if(i==0||i==h-1||j==0||j==w-1){
                    std::cout<<"#";
                }else{
                    std::cout<<".";
                }
            std::cout<<std::endl;
        }
        std::cout<<std::endl;
    }
    return 0;
}

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

#include <iostream>
using namespace std;

int main(){
  int H,W;
  int i,j;
  while(1){
    cin>>H>>W;
    if(H==0 && W==0) break;

    for(j=0;j<W;j++){
      cout<<"#";
    }
    cout<<endl;

    for(i=1;i<H-1;i++){
      cout<<"#"
      for(j=1;j<W-1;j++){
        cout<<".";
      }
      cout<<"#"<<endl;
    }

  }
    for(j=0;j<W;j++){
      cout<<"#";
    }
    cout<<endl;
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: expected ';' before 'for'
   17 |       cout<<"#"
      |                ^
      |                ;
   18 |       for(j=1;j<W-1;j++){
      |       ~~~       
a.cc:18:24: error: expected ';' before ')' token
   18 |       for(j=1;j<W-1;j++){
      |                        ^
      |                        ;
Language: C++

#include<iostream>
using namespace std;

int main(){
    int w, h;
    while(1){
       cin >> h >> w;
       if(w == 0 && h == 0) break;
       for(int a = 0; a < h; a++){
         for(int b = 0; b < w;b++){
            if( a = 1 || a = h){
                cout << "#";
             }else{
               if( b = 1 || b = w){
                 cout << "#";
                 }else{
                   cout << ".";
                  }      
               }  
             cout << endl;
             }
           cout << endl;
          }
       return 0;
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: lvalue required as left operand of assignment
   11 |             if( a = 1 || a = h){
      |                     ~~^~~~
a.cc:14:26: error: lvalue required as left operand of assignment
   14 |                if( b = 1 || b = w){
      |                        ~~^~~~
a.cc:25:8: error: expected '}' at end of input
   25 |       }
      |        ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int w, h;
    while(1){
       cin >> h >> w;
       if(w == 0 && h == 0) break;
       for(int a = 0; a < h; a++){
         for(int b = 0; b < w;b++){
            if( a == 1 || a == h){
                cout << "#";
             }else{
               if( b == 1 || b == w){
                 cout << "#";
                 }else{
                   cout << ".";
                  }      
               }  
             cout << endl;
             }
           cout << endl;
          }
       return 0;
      }

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

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

int main()
{
    while (true) {
        int h, w;
        cin >> h >> w;
        
        if (!h && !w) break;
        
        string s(w, ' ');
        s.[0] = '#';
        s.[s.size() - 1] = '#';
        
        for (int i = 0; i < h; i++)
            cout << s << "\n";
            
        cout << "\n";
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: expected unqualified-id before '[' token
   14 |         s.[0] = '#';
      |           ^
a.cc:15:11: error: expected unqualified-id before '[' token
   15 |         s.[s.size() - 1] = '#';
      |           ^
Language: C++

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

int main()
{
    while (true) {
        int h, w;
        cin >> h >> w;
        
        if (!h && !w) break;
        
        string s1(w, '#');
        
        string s2(w, ' ');
        s[0] = '#';
        s[s.size() - 1] = '#';
        
        cout << s1;
        for (int i = 1; i < h - 1; i++)
            cout << s2 << "\n";
        cout << s1;
            
        cout << "\n";
    }
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 's' was not declared in this scope; did you mean 's2'?
   16 |         s[0] = '#';
      |         ^
      |         s2