Language: C++

#define C std::cout<<
main() {int H,W,i,j;while(std::cin>>H>>W&&H){for(i=0;i<H;i++,C"#\n")for(j=0;j<W-1;)C(i*(i+1-H)*j++?".":"#");C"\n";}}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main() {int H,W,i,j;while(std::cin>>H>>W&&H){for(i=0;i<H;i++,C"#\n")for(j=0;j<W-1;)C(i*(i+1-H)*j++?".":"#");C"\n";}}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:32: error: 'cin' is not a member of 'std'
    2 | main() {int H,W,i,j;while(std::cin>>H>>W&&H){for(i=0;i<H;i++,C"#\n")for(j=0;j<W-1;)C(i*(i+1-H)*j++?".":"#");C"\n";}}
      |                                ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define C std::cout<<
a.cc:1:16: error: 'cout' is not a member of 'std'
    1 | #define C std::cout<<
      |                ^~~~
a.cc:2:62: note: in expansion of macro 'C'
    2 | main() {int H,W,i,j;while(std::cin>>H>>W&&H){for(i=0;i<H;i++,C"#\n")for(j=0;j<W-1;)C(i*(i+1-H)*j++?".":"#");C"\n";}}
      |                                                              ^
a.cc:1:16: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #define C std::cout<<
      |                ^~~~
a.cc:2:62: note: in expansion of macro 'C'
    2 | main() {int H,W,i,j;while(std::cin>>H>>W&&H){for(i=0;i<H;i++,C"#\n")for(j=0;j<W-1;)C(i*(i+1-H)*j++?".":"#");C"\n";}}
      |                                                              ^
a.cc:1:16: error: 'cout' is not a member of 'std'
    1 | #define C std::cout<<
      |                ^~~~
a.cc:2:84: note: in expansion of macro 'C'
    2 | main() {int H,W,i,j;while(std::cin>>H>>W&&H){for(i=0;i<H;i++,C"#\n")for(j=0;j<W-1;)C(i*(i+1-H)*j++?".":"#");C"\n";}}
      |                                                                                    ^
a.cc:1:16: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #define C std::cout<<
      |                ^~~~
a.cc:2:84: note: in expansion of macro 'C'
    2 | main() {int H,W,i,j;while(std::cin>>H>>W&&H){for(i=0;i<H;i++,C"#\n")for(j=0;j<W-1;)C(i*(i+1-H)*j++?".":"#");C"\n";}}
      |                                                                                    ^
a.cc:1:16: error: 'cout' is not a member of 'std'
    1 | #define C std::cout<<
      |                ^~~~
a.cc:2:109: note: in expansion of macro 'C'
    2 | main() {int H,W,i,j;while(std::cin>>H>>W&&H){for(i=0;i<H;i++,C"#\n")for(j=0;j<W-1;)C(i*(i+1-H)*j++?".":"#");C"\n";}}
      |                                                                                                             ^
a.cc:1:16: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #define C std::cout<<
      |                ^~~~
a.cc:2:109: note: in expansion of macro 'C'
    2 | main() {int H,W,i,j;while(std::cin>>H>>W&&H){for(i=0;i<H;i++,C"#\n")for(j=0;j<W-1;)C(i*(i+1-H)*j++?".":"#");C"\n";}}
      |                                                                                                             ^