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

#include <iostream>
#include <conio.h>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0)break;
		for(int i = 0;i<c;i++)
		{
			printf("#");
			
		}
		printf("\n");
		for(int j = 0;j<d-1;j++)
		{
			printf("#");
			for(int i=0+1;i<d-1;i++){
				printf(".");
				
			}
			printf("#");
			printf("\n");
		}
		for(int i=0;i<c;i++)
			printf("#");
	}
	_getch();
}

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

#include <iostream>
#include <conio.h>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0)break;
		for(int i = 0;i<c;i++)
		{
			printf("#");
			
		}
		printf("\n");
		printf("\n");
		for(int j = 0;j<d-1;j++)
		{
			printf("#");
			for(int i=0+1;i<d-1;i++){
				printf(".");
				
			}
			printf("#");
			printf("\n");
			printf("\n");
		}
		for(int i=0;i<c;i++)
			printf("#");
	}
	_getch();
}

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

#include <iostream>
#include <conio.h>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0)break;
		for(int i = 0;i<d;i++)
		{
			printf("#");
			
		}
		printf("\n");
		printf("\n");
		for(int j = 0;j<c-1;j++)
		{
			printf("#");
			for(int i=0+1;i<d-1;i++){
				printf(".");
				
			}
			printf("#");
			printf("\n");
			printf("\n");
		}
		for(int i=0;i<d;i++)
			printf("#");
	}
	_getch();
}

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

#include <iostream>
#include <conio.h>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0)break;
		for(int i = 0;i<d;i++)
		{
			printf("#");
			
		}
		
		printf("\n");
		for(int j = 0;j<c-1;j++)
		{
			printf("#");
			for(int i=0+1;i<d-1;i++){
				printf(".");
				
			}
			printf("#");
			printf("\n");
		
		}
		for(int i=0;i<d;i++)
			printf("#");
	}
	_getch();
}

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

#include<iostream>
using namespace std;
int main() {i
nt a, b;
for (int h = 0;; h++){
cin >> a >> b;
if (a != 0){
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++){
if (j > 0 && j < b - 1 && i>0 && i<a-1){
cout << "." ;
}
else{cout << "#" ;}
if(j==b-1)cout<<endl;
}
}
}
else{break;}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:13: error: 'i' was not declared in this scope
    3 | int main() {i
      |             ^
a.cc:6:8: error: 'a' was not declared in this scope
    6 | cin >> a >> b;
      |        ^
a.cc:6:13: error: 'b' was not declared in this scope
    6 | cin >> a >> b;
      |             ^
Language: C++

#include <iostream>
#include <conio.h>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0)break;
		for(int i = 0;i<d;i++)
		{
			printf("#");
		}
		printf("\n");
		for(int j = 0;j<c-1;j++)
		{
			printf("#");
			for(int i=0+1;i<d-1;i++){
				printf(".");	
			}
			printf("#");
			printf("\n");
		}
		for(int i=0;i<d;i++)
			printf("#");
	}
	_getch();
}

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

#include <iostream>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0)break;
		for(int i = 0;i<d;i++)
		{
			printf("#");
		}
		printf("\n");
		for(int j = 0;j<c-1;j++)
		{
			printf("#");
			for(int i=0+1;i<d-1;i++){
				printf(".");	
			}
			printf("#");
			printf("\n");
		}
		for(int i=0;i<d;i++)
			printf("#");
	}
	returm
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:27:9: error: 'returm' was not declared in this scope
   27 |         returm
      |         ^~~~~~
Language: C++

#include <iostream>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0)break;
		for(int i = 0;i<d;i++)
		{
			count<<"#"<<end;
		}
		printf("\n");
		for(int j = 0;j<c-1;j++)
		{
			count<<"#"<<end;
			for(int i=0+1;i<d-1;i++){
				count<<"."<<end;	
			}
			count<<"#"<<end;
			printf("\n");
		}
		for(int i=0;i<d;i++)
			count<<"#"<<end;
	}
	returm
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:25: error: 'count' was not declared in this scope
   12 |                         count<<"#"<<end;
      |                         ^~~~~
a.cc:17:25: error: 'count' was not declared in this scope
   17 |                         count<<"#"<<end;
      |                         ^~~~~
a.cc:25:25: error: 'count' was not declared in this scope
   25 |                         count<<"#"<<end;
      |                         ^~~~~
a.cc:27:9: error: 'returm' was not declared in this scope
   27 |         returm
      |         ^~~~~~
Language: C++

#include<iostream>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0) break;
		for(int i = 0; i < d; i++)
		{
			printf("#");
			
		}
		printf("\n");
		printf("\n");
		for(int j = 0; j < c - 1; j++)
		{
			printf("#");
			for(int i = 0 + 1; i < d - 1; i++){
				printf(".");
				
			}
			printf("#");
			printf("\n");
			printf("\n");
		}
		for(int i = 0;i < d ;i++)
			printf("#");
	}
	_getch();
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:31:9: error: '_getch' was not declared in this scope; did you mean 'getc'?
   31 |         _getch();
      |         ^~~~~~
      |         getc
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,b;
for (int h = 0;; h++){cin >> a >> b;
if (a != 0){
for (int i = 0; i < a; i++) {
for (int j = 0; j < b; j++){
if (j > 0 && j < b - 1 && i>0 && i<a-1){
cout << "." ;
}
else{
cout << "#" ;}
if(j==b-1){cout<<endl};
}
}
}
else{break;}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: expected ';' before '}' token
   14 | if(j==b-1){cout<<endl};
      |                      ^
      |                      ;
Language: C++

#include<iostream>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0) break;
		for(int i = 0; i < d; i++)
		{
			printf("#");
			
		}
		printf("\n");
		printf("\n");
		for(int j = 0 + 1; j < c - 1; j++)
		{
			printf("#");
			for(int i = 0 + 1; i < d - 1; i++){
				printf(".");
				
			}
			printf("#");
			printf("\n");
			printf("\n");
		}
		for(int i = 0;i < d ;i++)
			printf("#");
	}
	_getch();
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:31:9: error: '_getch' was not declared in this scope; did you mean 'getc'?
   31 |         _getch();
      |         ^~~~~~
      |         getc
Language: C++

#include <iostream>
#include <conio.h>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0)break;
		for(int i = 0;i<d;i++)
		{
			printf("#");
			
		}
		printf("\n");
		printf("\n");
		for(int j = 0+1;j<c-1;j++)
		{
			printf("#");
			for(int i=0+1;i<d-1;i++){
				printf(".");
				
			}
			printf("#");
			printf("\n");
			printf("\n");
		}
		for(int i=0;i<d;i++)
			printf("#");
		
	}
	_getch();
}

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

#include <iostream>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0)break;
		for(int i = 0;i<d;i++)
		{
			printf("#");
			
		}
		printf("\n");
		printf("\n");
		for(int j = 0+1;j<c-1;j++)
		{
			printf("#");
			for(int i=0+1;i<d-1;i++){
				printf(".");
				
			}
			printf("#");
			printf("\n");
			printf("\n");
		}
		for(int i=0;i<d;i++)
			printf("#");
		printf("\n");
	}
	return 0;
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
Language: C++

#include <iostream>
using namespace std;
void main()
{
	while (1)
	{
		int d,c;
		cin>>d>>c;
		if(d == 0 && c == 0)break;
		for(int i = 0;i<d;i++)
		{
			printf("#");
			
		}
		printf("\n");
		
		for(int j = 0+1;j<c-1;j++)
		{
			printf("#");
			for(int i=0+1;i<d-1;i++){
				printf(".");
				
			}
			printf("#");
			printf("\n");
			print
		}
		for(int i=0;i<d;i++)
			printf("#");
		printf("\n");
	}
	return 0;
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:26:25: error: 'print' was not declared in this scope; did you mean 'printf'?
   26 |                         print
      |                         ^~~~~
      |                         printf
Language: C++

while True:
    h, w = map(int, input().split(" "))
    if h == 0 and w == 0:
        break
    print("")
    print("#"*w)
    print(("#"+ "."*(w-2) +"#" + "\n")*(h-2) + "#" * w) if h >2 and w>=2 else 0
    print("#"*w) if h == 2 else 0
    print("")

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
	while(1){
		int h,w;
		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:12:52: error: expected ';' before 'else'
   12 |                                         cout << "#"
      |                                                    ^
      |                                                    ;
   13 |                                 else
      |                                 ~~~~
Language: C++

#include <iostream>
using namespace std;

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

    for(int i = 1, i <= h, i++)
    {
        if(i == 1 || i == h)
        {
            int n = 0;
            while(n < w)
            {
                cout << '#';
                n++;
            }
            cout << endl;
        }
        else
        {
            int n = 1;
            while(n <= w)
            {
                if(n = 1 || n = w)
                    cout << '#';
                else
                    cout << '.';
            }
            cout << endl;
        }
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected ';' before '<=' token
   10 |     for(int i = 1, i <= h, i++)
      |                     ^~~
      |                     ;
a.cc:10:22: error: expected primary-expression before '<=' token
   10 |     for(int i = 1, i <= h, i++)
      |                      ^~
a.cc:10:31: error: expected ';' before ')' token
   10 |     for(int i = 1, i <= h, i++)
      |                               ^
      |                               ;
a.cc:27:26: error: lvalue required as left operand of assignment
   27 |                 if(n = 1 || n = w)
      |                        ~~^~~~
Language: C++

#include <iostream>
using namespace std;
 
int main()
{
    int h = -1, 
        w = -1;
    
    while(h != 0 && w != 0)
    {
        cin  >> h >> w;
 
        for(int i = 1; i <= h; i++)
        {
            if(i == 1 || i == h)
            {
                int n = 0;
                while(n < h)
                {
                    cout << '#';
                    n++;
                }
                cout << endl;
            }
            else
            {
                int n = 1;
                while(n <= h)
                {
                    if(n == 1 || n == h)
                        cout << '#';
                    else
                        cout << '.';
                    n++;
                }
                cout << endl;
            }
            cout << endl
        }
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:25: error: expected ';' before '}' token
   38 |             cout << endl
      |                         ^
      |                         ;
   39 |         }
      |         ~
Language: C++

#include<stdio.h>
#include<math.h>
int main(void){
	int h,w,i,i2;
	scanf("%d %d",&h,&w);
	while(h!=0&&w!=0){
		for(i=0;i<h;i++){
			for(i2=0;i2<w;i2++){
				if(i==0||i2==0||i==h-1||i2==w-1){
					printf("#");
				}
				else{
					printf(".");
			}
			printf("\n");
		}
		printf("\n");
		scanf("%d %d",&h,&w);
	}
	return 0;
}

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

while True:
    H, W = map(int, input().split())
    if not(H or W):
        break
    for i in range(H):
        print('#', end='')
        for j in range(W-2):
            if i > 0 and i < H - 1:
                print('.', end='')
            else:
                print('#', end='')
        print('#')
    print()

Compiler output:
a.cc:6:24: error: empty character constant
    6 |         print('#', end='')
      |                        ^~
a.cc:9:32: error: empty character constant
    9 |                 print('.', end='')
      |                                ^~
a.cc:11:32: error: empty character constant
   11 |                 print('#', end='')
      |                                ^~
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
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 << "\n";
		}
		cout << endl;
	}
	retuen 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'retuen' was not declared in this scope
   23 |         retuen 0;
      |         ^~~~~~
Language: C++

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

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

for (int i = 0; i < W / 2; i++){
					cout << "#" << ".";
				}
				if ((W + 1) % 2 == 0){
					cout << "#";
				}
			}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'for'
    1 | for (int i = 0; i < W / 2; i++){
      | ^~~
a.cc:1:17: error: 'i' does not name a type
    1 | for (int i = 0; i < W / 2; i++){
      |                 ^
a.cc:1:28: error: 'i' does not name a type
    1 | for (int i = 0; i < W / 2; i++){
      |                            ^
a.cc:4:33: error: expected unqualified-id before 'if'
    4 |                                 if ((W + 1) % 2 == 0){
      |                                 ^~
a.cc:7:25: error: expected declaration before '}' token
    7 |                         }
      |                         ^
Language: C++

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

 return 0;
}

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

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

 return 0;
}

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

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

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

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

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

#include<stdio.h>

int hasi(int w)
{
	int i;
	for(i=1;i<=w;i++)
	{
		printf("#");
	}
}

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

Compiler output:
a.cc: In function 'int hasi(int)':
a.cc:10:1: warning: no return statement in function returning non-void [-Wreturn-type]
   10 | }
      | ^
a.cc: In function 'int naka(int)':
a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
   21 | }
      | ^
a.cc: At global scope:
a.cc:23:1: error: '::main' must return 'int'
   23 | void main()
      | ^~~~
Language: C++

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

int a = 0;
int b = 1;

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

int fream(int H ,int W) {
     while(1) {
         if( b == 1) {
             while(1) {
                 ++a;
                 if(a == W) {
                     printf("#\n");
                     b++
                     a = 1;
                     break;
                 }
                 printf("#");
             }
         }

          if( b == H) {
             while(1) {
                 ++a;
                 if(a == W) {
                     printf("#\n");
                     b++
                     a = 0;
                     break;
                 }
                 printf("#");
             }
         }

         if(b != 1 && b != H) {
             while(1) {
                 ++a;
                 if(a == 1) {
                    printf("#");
                    ++a;
                 }

                 if(a == W) {
                     printf("#\n");
                     ++b;
                     a = 0;
                     break;
                 }

                 if(a != 1 && a != W) {
                     printf(".");
                 }
             }
         }
     }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'H' was not declared in this scope
    9 |         cin >> H >> W;
      |                ^
a.cc:9:21: error: 'W' was not declared in this scope
    9 |         cin >> H >> W;
      |                     ^
a.cc:11:9: error: 'fream' was not declared in this scope; did you mean 'fread'?
   11 |         fream(H,W)
      |         ^~~~~
      |         fread
a.cc: In function 'int fream(int, int)':
a.cc:22:25: error: expected ';' before 'a'
   22 |                      b++
      |                         ^
      |                         ;
   23 |                      a = 1;
      |                      ~   
a.cc:35:25: error: expected ';' before 'a'
   35 |                      b++
      |                         ^
      |                         ;
   36 |                      a = 0;
      |                      ~   
a.cc:63:7: error: expected '}' at end of input
   63 |      }
      |       ^
a.cc:15:25: note: to match this '{'
   15 | int fream(int H ,int W) {
      |                         ^
Language: C++

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

int a = 0;
int b = 1;

int main() {
    while(1) {
        cin << H << W;
        if(H == W == 0) break;
        plus(H,W)
    }
}

int plus(int H ,int W) {
     while(1) {
         if( b == 1) {
             while(1) {
                 ++a;
                 if(a == W) {
                     printf("#\n");
                     b++;
                     a = 1;
                     break;
                 }
                 printf("#");
             }
         }

          if( b == H) {
             while(1) {
                 ++a;
                 if(a == W) {
                     printf("#\n");
                     b++;
                     a = 0;
                     break;
                 }
                 printf("#");
             }
         }

         if(b != 1 && b != H) {
             while(1) {
                 ++a;
                 if(a == 1) {
                    printf("#");
                    ++a;
                 }

                 if(a == W) {
                     printf("#\n");
                     ++b;
                     a = 0;
                     break;
                 }

                 if(a != 1 && a != W) {
                     printf(".");
                 }
             }
         }
     }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'H' was not declared in this scope
    9 |         cin << H << W;
      |                ^
a.cc:9:21: error: 'W' was not declared in this scope
    9 |         cin << H << W;
      |                     ^
Language: C++

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

int a = 0;
int b = 1;

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

int plus(int H ,int W) {
     while(1) {
         if( b == 1) {
             while(1) {
                 ++a;
                 if(a == W) {
                     printf("#\n");
                     b++;
                     a = 1;
                     break;
                 }
                 printf("#");
             }
         }

          if( b == H) {
             while(1) {
                 ++a;
                 if(a == W) {
                     printf("#\n");
                     b++;
                     a = 0;
                     break;
                 }
                 printf("#");
             }
         }

         if(b != 1 && b != H) {
             while(1) {
                 ++a;
                 if(a == 1) {
                    printf("#");
                    ++a;
                 }

                 if(a == W) {
                     printf("#\n");
                     ++b;
                     a = 0;
                     break;
                 }

                 if(a != 1 && a != W) {
                     printf(".");
                 }
             }
         }
     }
}

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

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

int a = 0;
int b = 1;

int plus(int,int);

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

int plus(int H ,int W) {
     while(1) {
         if( b == 1) {
             while(1) {
                 ++a;
                 if(a == W) {
                     printf("#\n");
                     b++;
                     a = 1;
                     break;
                 }
                 printf("#");
             }
         }

          if( b == H) {
             while(1) {
                 ++a;
                 if(a == W) {
                     printf("#\n");
                     b++;
                     a = 0;
                     break;
                 }
                 printf("#");
             }
         }

         if(b != 1 && b != H) {
             while(1) {
                 ++a;
                 if(a == 1) {
                    printf("#");
                    ++a;
                 }

                 if(a == W) {
                     printf("#\n");
                     ++b;
                     a = 0;
                     break;
                 }

                 if(a != 1 && a != W) {
                     printf(".");
                 }
             }
         }
     }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'H' was not declared in this scope
   11 |         cin >> H >> W;
      |                ^
a.cc:11:21: error: 'W' was not declared in this scope
   11 |         cin >> H >> W;
      |                     ^
a.cc:13:9: error: reference to 'plus' is ambiguous
   13 |         plus(H,W);
      |         ^~~~
In file included from /usr/include/c++/14/string:49,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_function.h:160:12: note: candidates are: 'template<class _Tp> struct std::plus'
  160 |     struct plus;
      |            ^~~~
a.cc:7:5: note:                 'int plus(int, int)'
    7 | int plus(int,int);
      |     ^~~~
Language: C++

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

int a = 0;
int b = 1;

int main() {
    while(1) {
        cin >> H >> W;
        if(H == W == 0) break;
         while(1) {
         if( b == 1) {
             while(1) {
                 ++a;
                 if(a == W) {
                     printf("#\n");
                     b++;
                     a = 1;
                     break;
                 }
                 printf("#");
             }
         }

          if( b == H) {
             while(1) {
                 ++a;
                 if(a == W) {
                     printf("#\n");
                     b++;
                     a = 0;
                     break;
                 }
                 printf("#");
             }
         }

         if(b != 1 && b != H) {
             while(1) {
                 ++a;
                 if(a == 1) {
                    printf("#");
                    ++a;
                 }

                 if(a == W) {
                     printf("#\n");
                     ++b;
                     a = 0;
                     break;
                 }

                 if(a != 1 && a != W) {
                     printf(".");
                 }
             }
         }
     }
    }
}

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

include <iostream>
using namespace std;

int main(){

	int H,W;

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

	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:15: error: 'cin' was not declared in this scope
    8 |         while(cin >> H >> W, H){
      |               ^~~
a.cc:12:41: error: 'cout' was not declared in this scope
   12 |                                         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;
      |                                 ^~~~
Language: C++

#include <stdio.h>

//????????£?¨?---------------------------
void print_rect(int x, int y);      //????????¢???????????¢??°
//------------------------------------
int main(void)
{
	int H, W;

	while(1){
		scanf("%d %d", &H, &W);
		
		if(H == 0 && W == 0){
			break;
		}
		if(H >= 3 && W >= 3)
			print_rect(H, W);
		
		else{
			print_rect_all(H, W);
		}
	}
   return 0;
}

//--------------------------------------------
void print_rect(int x, int y)
{
	for(int i = 0; i < x; i++){
			for(int j = 0; j < y; j++){
				if(i == 0 || j == 0 || i == x - 1 || j == y - 1 ){
					printf("#");
				}
				else{
					printf(".");
				}
			}
			printf("\n");
		}
		printf("\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: 'print_rect_all' was not declared in this scope; did you mean 'print_rect'?
   20 |                         print_rect_all(H, W);
      |                         ^~~~~~~~~~~~~~
      |                         print_rect
Language: C++

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

int H,W;
int vertical;

int main() {
  while(1) {
    vartical = 0;
    cin >> H >> W;

    if (H == 0 && W == 0) break;
    
    while(1) {
      if(vartical == H-1) {
        for(int c = 0,c < W.++a) {
          cout <<"#";
        }
        cout << endl;
        break;
      }
      
      if(vartical == 0) {
        for(int a = 0,a < W.++a) {
          cout <<"#";
        }
        cout << endl;
        ++vartical;
      }
  
      if(vartical != 0 && vartical != H-1) {
        for(int b = 0,b < W, ++b){
          
          if(b == 0 || b == W-1) {
            cout << "#";
          }
  
          if(b != 0 && b != W-1) {
            cout << "."
          }
          cout << endl;
          ++vartical
        }
        
      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'vartical' was not declared in this scope; did you mean 'vertical'?
    9 |     vartical = 0;
      |     ^~~~~~~~
      |     vertical
a.cc:16:24: error: expected ';' before '<' token
   16 |         for(int c = 0,c < W.++a) {
      |                        ^~
      |                        ;
a.cc:16:25: error: expected primary-expression before '<' token
   16 |         for(int c = 0,c < W.++a) {
      |                         ^
a.cc:16:29: error: expected unqualified-id before '++' token
   16 |         for(int c = 0,c < W.++a) {
      |                             ^~
a.cc:16:31: error: expected ';' before 'a'
   16 |         for(int c = 0,c < W.++a) {
      |                               ^
      |                               ;
a.cc:16:31: error: 'a' was not declared in this scope
a.cc:24:24: error: expected ';' before '<' token
   24 |         for(int a = 0,a < W.++a) {
      |                        ^~
      |                        ;
a.cc:24:25: error: expected primary-expression before '<' token
   24 |         for(int a = 0,a < W.++a) {
      |                         ^
a.cc:24:29: error: expected unqualified-id before '++' token
   24 |         for(int a = 0,a < W.++a) {
      |                             ^~
a.cc:24:31: error: expected ';' before 'a'
   24 |         for(int a = 0,a < W.++a) {
      |                               ^
      |                               ;
a.cc:32:24: error: expected ';' before '<' token
   32 |         for(int b = 0,b < W, ++b){
      |                        ^~
      |                        ;
a.cc:32:25: error: expected primary-expression before '<' token
   32 |         for(int b = 0,b < W, ++b){
      |                         ^
a.cc:32:33: error: expected ';' before ')' token
   32 |         for(int b = 0,b < W, ++b){
      |                                 ^
      |                                 ;
a.cc:39:24: error: expected ';' before '}' token
   39 |             cout << "."
      |                        ^
      |                        ;
   40 |           }
      |           ~
Language: C++

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

int H,W;
int vartical;

int main() {
  while(1) {
    vartical = 0;
    cin >> H >> W;

    if (H == 0 && W == 0) break;
    
    while(1) {
      if(vartical == H-1) {
        for(int c = 0,c < W.++a) {
          cout <<"#";
        }
        cout << endl;
        break;
      }
      
      if(vartical == 0) {
        for(int a = 0,a < W.++a) {
          cout <<"#";
        }
        cout << endl;
        ++vartical;
      }
  
      if(vartical != 0 && vartical != H-1) {
        for(int b = 0,b < W, ++b){
          
          if(b == 0 || b == W-1) {
            cout << "#";
          }
  
          if(b != 0 && b != W-1) {
            cout << "."
          }
          cout << endl;
          ++vartical
        }
        
      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: expected ';' before '<' token
   16 |         for(int c = 0,c < W.++a) {
      |                        ^~
      |                        ;
a.cc:16:25: error: expected primary-expression before '<' token
   16 |         for(int c = 0,c < W.++a) {
      |                         ^
a.cc:16:29: error: expected unqualified-id before '++' token
   16 |         for(int c = 0,c < W.++a) {
      |                             ^~
a.cc:16:31: error: expected ';' before 'a'
   16 |         for(int c = 0,c < W.++a) {
      |                               ^
      |                               ;
a.cc:16:31: error: 'a' was not declared in this scope
a.cc:24:24: error: expected ';' before '<' token
   24 |         for(int a = 0,a < W.++a) {
      |                        ^~
      |                        ;
a.cc:24:25: error: expected primary-expression before '<' token
   24 |         for(int a = 0,a < W.++a) {
      |                         ^
a.cc:24:29: error: expected unqualified-id before '++' token
   24 |         for(int a = 0,a < W.++a) {
      |                             ^~
a.cc:24:31: error: expected ';' before 'a'
   24 |         for(int a = 0,a < W.++a) {
      |                               ^
      |                               ;
a.cc:32:24: error: expected ';' before '<' token
   32 |         for(int b = 0,b < W, ++b){
      |                        ^~
      |                        ;
a.cc:32:25: error: expected primary-expression before '<' token
   32 |         for(int b = 0,b < W, ++b){
      |                         ^
a.cc:32:33: error: expected ';' before ')' token
   32 |         for(int b = 0,b < W, ++b){
      |                                 ^
      |                                 ;
a.cc:39:24: error: expected ';' before '}' token
   39 |             cout << "."
      |                        ^
      |                        ;
   40 |           }
      |           ~             
a.cc:42:21: error: expected ';' before '}' token
   42 |           ++vartical
      |                     ^
      |                     ;
   43 |         }
      |         ~
Language: C++

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

int H,W;
int vartical;

int main() {
  while(1) {
    vartical = 0;
    cin >> H >> W;

    if (H == 0 && W == 0) break;
    
    while(1) {
      if(vartical == H-1) {
        for(int c = 0,c < W.++c) {
          cout <<"#";
        }
        cout << endl;
        break;
      }
      
      if(vartical == 0) {
        for(int a = 0,a < W.++a) {
          cout <<"#";
        }
        cout << endl;
        ++vartical;
      }
  
      if(vartical != 0 && vartical != H-1) {
        for(int b = 0,b < W, ++b){
          
          if(b == 0 || b == W-1) {
            cout << "#";
          }
  
          if(b != 0 && b != W-1) {
            cout << "."
          }
          cout << endl;
          ++vartical
        }
        
      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: expected ';' before '<' token
   16 |         for(int c = 0,c < W.++c) {
      |                        ^~
      |                        ;
a.cc:16:25: error: expected primary-expression before '<' token
   16 |         for(int c = 0,c < W.++c) {
      |                         ^
a.cc:16:29: error: expected unqualified-id before '++' token
   16 |         for(int c = 0,c < W.++c) {
      |                             ^~
a.cc:16:31: error: expected ';' before 'c'
   16 |         for(int c = 0,c < W.++c) {
      |                               ^
      |                               ;
a.cc:24:24: error: expected ';' before '<' token
   24 |         for(int a = 0,a < W.++a) {
      |                        ^~
      |                        ;
a.cc:24:25: error: expected primary-expression before '<' token
   24 |         for(int a = 0,a < W.++a) {
      |                         ^
a.cc:24:29: error: expected unqualified-id before '++' token
   24 |         for(int a = 0,a < W.++a) {
      |                             ^~
a.cc:24:31: error: expected ';' before 'a'
   24 |         for(int a = 0,a < W.++a) {
      |                               ^
      |                               ;
a.cc:32:24: error: expected ';' before '<' token
   32 |         for(int b = 0,b < W, ++b){
      |                        ^~
      |                        ;
a.cc:32:25: error: expected primary-expression before '<' token
   32 |         for(int b = 0,b < W, ++b){
      |                         ^
a.cc:32:33: error: expected ';' before ')' token
   32 |         for(int b = 0,b < W, ++b){
      |                                 ^
      |                                 ;
a.cc:39:24: error: expected ';' before '}' token
   39 |             cout << "."
      |                        ^
      |                        ;
   40 |           }
      |           ~             
a.cc:42:21: error: expected ';' before '}' token
   42 |           ++vartical
      |                     ^
      |                     ;
   43 |         }
      |         ~
Language: C++

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

int H,W;
int vartical;

int main() {
  while(1) {
    vartical = 0;
    cin >> H >> W;

    if (H == 0 && W == 0) break;
    
    while(1) {
      if(vartical == H-1) {
        for(int c = 0;c < W;++c) {
          cout <<"#";
        }
        cout << endl;
        break;
      }
      
      if(vartical == 0) {
        for(int a = 0;a < W;++a) {
          cout <<"#";
        }
        cout << endl;
        ++vartical;
      }
  
      if(vartical != 0 && vartical != H-1) {
        for(int b = 0;b < W;++b){
          
          if(b == 0 || b == W-1) {
            cout << "#";
          }
  
          if(b != 0 && b != W-1) {
            cout << "."
          }
          cout << endl;
          ++vartical
        }
        
      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:24: error: expected ';' before '}' token
   39 |             cout << "."
      |                        ^
      |                        ;
   40 |           }
      |           ~             
a.cc:42:21: error: expected ';' before '}' token
   42 |           ++vartical
      |                     ^
      |                     ;
   43 |         }
      |         ~
Language: C++

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

int H,W;
int vartical;

int main() {
  while(1) {
    vartical = 0;
    cin >> H >> W;

    if (H == 0 && W == 0) break;
    
    while(1) {
      if(vartical == H-1) {
        for(int c = 0;c < W;++c) {
          cout <<"#";
        }
        cout << endl;
        break;
      }
      
      if(vartical == 0) {
        for(int a = 0;a < W;++a) {
          cout <<"#";
        }
        cout << endl;
        ++vartical;
      }
  
      if(vartical != 0 && vartical != H-1) {
        for(int b = 0;b < W;++b){
          
          if(b == 0 || b == W-1) {
            cout << "#";
          }
  
          if(b != 0 && b != W-1) {
            cout << "."
          }
          cout << endl;
          ++vartical;
        }
        
      }
    }
  }

  return 0;
}

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

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

int H,W;
int vartical = 0;

int main() {
  while(1) {
    cin >> H >> W;

    if (H == 0 && W == 0) break;

    while(1) {
      if(vartical == H-1) {
        for(int c = 0;c < W;++c) {
          cout <<"#";
        }
        cout << endl;
        vartical = 0
        break;
      }

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

      if(vartical != 0 && vartical != H-1) {
        for(int b = 0;b < W;++b){

          if(b == 0 || b == W-1) {
            cout << "#";
          }

          if(b != 0 && b != W-1) {
            cout << ".";
          }
          cout << endl;
          ++vartical;
        }

      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: expected ';' before 'break'
   19 |         vartical = 0
      |                     ^
      |                     ;
   20 |         break;
      |         ~~~~~
Language: C++

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

int H,W;
int vartical = 0;

int main() {
  while(1) {
    cin >> H >> W;

    if (H == 0 && W == 0) break

    while(1) {
      if(vartical == H-1) {
        for(int c = 0;c < W;++c) {
          cout <<"#";
        }
        cout << endl;
        vartical = 0
        break;
      }

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

      if(vartical != 0 && vartical != H-1) {
        for(int b = 0;b < W;++b){

          if(b == 0 || b == W-1) {
            cout << "#";
          }

          if(b != 0 && b != W-1) {
            cout << ".";
          }
          cout << endl;
          ++vartical;
        }

      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:32: error: expected ';' before 'while'
   11 |     if (H == 0 && W == 0) break
      |                                ^
      |                                ;
   12 | 
   13 |     while(1) {
      |     ~~~~~                       
a.cc:19:21: error: expected ';' before 'break'
   19 |         vartical = 0
      |                     ^
      |                     ;
   20 |         break;
      |         ~~~~~
Language: C++

include <stdio.h>

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

	H = 1;
	W = 1;

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

	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
Language: C++

while 1:
	H,W=map(int,raw_input().split())
	if H==0 and W==0:
		break
	
	for i in range(H):
		if 2<=i<=H-1:
			print "#" + "."*W + "#"
			print ""
		if i==1 or i==H:
			print "#"*W
			print ""

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while 1:
      | ^~~~~
Language: C++

#include <iostream>
int main() {
    int h,w;
    while (scanf("%d %d", &h, &w)) {
        if (h == 0 & w == 0) break;
        char s[w+1], r[w+1];
        std::fill(s, s+w, '#');
        s[w] = '\0';
        memcpy(r, s, w+1);
        for (int i = 1; i < w-1; i++) r[i] = '.';
        puts(s);
        for (int i = 0; i++ < h-2;) puts(r);
        puts(s);
        puts("");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'memcpy' was not declared in this scope
    9 |         memcpy(r, s, w+1);
      |         ^~~~~~
a.cc:2:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | int main() {
Language: C++

#include <stdio.h>

int main()
{
    int i,j,k,a=0,count,H,W;
    while(1 == 1){
        scanf("%d%d", &H, &W);
        if(H==0&&W==0){
            return 0;
        }
    
    for (j=0;j<H[i]; j++){
        for (k=0;k<W[i];k++){
            if (j==0||j==H[i]-1){
                printf("#");
            }
            else{
                (k==0||k==W[i]-1)?printf("#"):printf(".");
            }
        }
        printf("\n");
    }
    printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: invalid types 'int[int]' for array subscript
   12 |     for (j=0;j<H[i]; j++){
      |                 ^
a.cc:13:21: error: invalid types 'int[int]' for array subscript
   13 |         for (k=0;k<W[i];k++){
      |                     ^
a.cc:14:27: error: invalid types 'int[int]' for array subscript
   14 |             if (j==0||j==H[i]-1){
      |                           ^
a.cc:18:28: error: invalid types 'int[int]' for array subscript
   18 |                 (k==0||k==W[i]-1)?printf("#"):printf(".");
      |                            ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:31:18: error: expected '}' at end of input
   31 |         return 0;
      |                  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

while True:
    h,w = map(int,input().split())
    if h == w == 0:
        break;
    print("#"*w)
    for i in range(h-2):
        print("#" + ("."*(w-2)) + "#")
    print("#"*w)
    print()

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
a.cc:5:10: error: expected constructor, destructor, or type conversion before '(' token
    5 |     print("#"*w)
      |          ^
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<w;i++){
   cout << "#" ;
  }
  cout << endl;
  for(i=0;i<h-1;i++){
   cout << "#" ;
   for(int j=1;j<w-1;j++){
    cout << "." ;
   }
   cout << "#" << endl;
  }
  for(int i=0;i<w;i++){
   cout << "#" ;
  }
  cout << endl;
 }
 cout << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   for(i=0;i<h-1;i++){
      |       ^
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<w;i++){
   cout << "#" ;
  }
  cout << endl;
  for(i=0;i<h-1;i++){
   cout << "#" ;
   for(int j=1;j<w-1;j++){
    cout << "." ;
   }
   cout << "#" << endl;
  }
  for(int i=0;i<w;i++){
   cout << "#" ;
  }
  cout << endl;
 cout << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:7: error: 'i' was not declared in this scope
   14 |   for(i=0;i<h-1;i++){
      |       ^