Language: C++

<?php  //?????§??? tamesi
while (true) {
    list($height, $width) = getInputExplodeBySpaces();
    
    if ($height == 0 && $width == 0) {
       break;
    }
    
    $FrameRectangle = new FrameRectangle($height, $width);
    echo $FrameRectangle->makeFrameRectangle();
}
 
function getInputExplodeBySpaces()
{
    return explode(' ', trim(fgets(STDIN)));
}
  
class Rectangle
{
    public $height;
    public $width;
    public $hashSymbol  = '#';
    
    public function __construct($height, $width)
    {
        $this->height = $height;
        $this->width  = $width;
    }

    public function setRectangleParts()
    {
        for ($i = 0; $i < $this->height; $i++) {
            for($j = 0; $j < $this->width; $j++) {
                $rectangleParts[$i][$j] = $this->hashSymbol;
            }
        }
        return $rectangleParts;
    }
    
    public function mergeRectangleParts($rectangleParts)
    {
        for ($i = 0; $i < $this->height; $i++) {
            $lines[] = implode($rectangleParts[$i]).PHP_EOL;
        }
        return implode($lines).PHP_EOL;
    }
}
 
class FrameRectangle extends Rectangle
{
    public $dotSymbol = '.';
    
    public function makeFrameRectangle()
    {
        $lines = $this->setRectangleParts();
        for ($i = 1; $i < $this->height - 1; $i++) {
            for($j = 1; $j < $this->width - 1; $j++) {
                $lines[$i][$j] = $this->dotSymbol; 
            }
        }
        
        return $this->mergeRectangleParts($lines);
    }
}

Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php  //?????§??? tamesi
      | ^
a.cc:13:1: error: 'function' does not name a type; did you mean 'union'?
   13 | function getInputExplodeBySpaces()
      | ^~~~~~~~
      | union
a.cc:20:11: error: expected ':' before '$height'
   20 |     public $height;
      |           ^~~~~~~~
      |           :
a.cc:20:12: error: '$height' does not name a type
   20 |     public $height;
      |            ^~~~~~~
a.cc:21:11: error: expected ':' before '$width'
   21 |     public $width;
      |           ^~~~~~~
      |           :
a.cc:21:12: error: '$width' does not name a type
   21 |     public $width;
      |            ^~~~~~
a.cc:22:11: error: expected ':' before '$hashSymbol'
   22 |     public $hashSymbol  = '#';
      |           ^~~~~~~~~~~~
      |           :
a.cc:22:12: error: '$hashSymbol' does not name a type
   22 |     public $hashSymbol  = '#';
      |            ^~~~~~~~~~~
a.cc:24:11: error: expected ':' before 'function'
   24 |     public function __construct($height, $width)
      |           ^~~~~~~~~
      |           :
a.cc:24:12: error: 'function' does not name a type; did you mean 'union'?
   24 |     public function __construct($height, $width)
      |            ^~~~~~~~
      |            union
a.cc:30:11: error: expected ':' before 'function'
   30 |     public function setRectangleParts()
      |           ^~~~~~~~~
      |           :
a.cc:30:12: error: 'function' does not name a type; did you mean 'union'?
   30 |     public function setRectangleParts()
      |            ^~~~~~~~
      |            union
a.cc:40:11: error: expected ':' before 'function'
   40 |     public function mergeRectangleParts($rectangleParts)
      |           ^~~~~~~~~
      |           :
a.cc:40:12: error: 'function' does not name a type; did you mean 'union'?
   40 |     public function mergeRectangleParts($rectangleParts)
      |            ^~~~~~~~
      |            union
a.cc:47:2: error: expected ';' after class definition
   47 | }
      |  ^
      |  ;
a.cc:49:30: error: expected initializer before 'Rectangle'
   49 | class FrameRectangle extends Rectangle
      |                              ^~~~~~~~~