Language: C++

#include <iostream>
int main(){
    int H,W;
    int i=0;
    while(1){
        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:12:21: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |                     cout<<"#";
      |                     ^~~~
      |                     std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |                         cout<<"#";
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:19:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 |                         cout<<".";
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:21: error: 'else' without a previous 'if'
   21 |                     else if(i==W){
      |                     ^~~~
a.cc:22:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   22 |                         cout<<"#";
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:25:17: error: 'else' without a previous 'if'
   25 |                 else if(n==H){
      |                 ^~~~
a.cc:26:21: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |                     cout<<"#";
      |                     ^~~~
      |                     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:29:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   29 |             cout<<endl;
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:29:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   29 |             cout<<endl;
      |                   ^~~~
      |                   std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:31:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   31 |         cout<<endl;<
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:31:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   31 |         cout<<endl;<
      |               ^~~~
      |               std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:31:20: error: expected primary-expression before '<' token
   31 |         cout<<endl;<
      |                    ^
a.cc:32:5: error: expected primary-expression before '}' token
   32 |     }
      |     ^