Language: C++

#include<iostream>
#include<vector>
#include<string>
 
int main(void){
  int H,W;
  cin >> H >> W;
  
  vector<string> vec(H);
  
  for(int i = 0;i < H;i++){
    cin >> vec.at(i);
  }
  
  for(int i = 1;i <= H + 2;i++){
    if(i == 1 || i == H + 2){
      for(int j = 1;j <= W + 2;j++) cout << "#";
      cout << endl;
    }else{
      cout << "#" << vec.at(i) << "#" << endl;
    }
  }
}
#include<iostream>
#include<vector>

int main(void){
  int H,W;
  cin >> H >> W;
  
  vector<char> vec(H);
  
  for(int i = 0;i < H;i++){
    cin >> vec.at(i);
  }
  
  for(int i = 1;i <= H + 2;i++){
    if(i == 1 || i == H + 2){
      for(int j = 1;j <= W + 2;j++) cout << "#";
      cout << endl;
    }else{
      cout << "#" << vec.at(i) << "#" << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> H >> W;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:3: error: 'vector' was not declared in this scope
    9 |   vector<string> vec(H);
      |   ^~~~~~
a.cc:9:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:9:10: error: 'string' was not declared in this scope
    9 |   vector<string> vec(H);
      |          ^~~~~~
a.cc:9:10: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:9:18: error: 'vec' was not declared in this scope
    9 |   vector<string> vec(H);
      |                  ^~~
a.cc:17:37: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |       for(int j = 1;j <= W + 2;j++) 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:18:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |       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:18:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |       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:20:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |       cout << "#" << vec.at(i) << "#" << 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:20:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |       cout << "#" << vec.at(i) << "#" << endl;
      |                                          ^~~~
      |                                          std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc: At global scope:
a.cc:27:5: error: redefinition of 'int main()'
   27 | int main(void){
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(void){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:29:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   29 |   cin >> H >> W;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:31:3: error: 'vector' was not declared in this scope
   31 |   vector<char> vec(H);
      |   ^~~~~~
a.cc:31:3: note: suggested alternatives:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:31:10: error: expected primary-expression before 'char'
   31 |   vector<char> vec(H);
      |          ^~~~
a.cc:34:12: error: 'vec' was not declared in this scope
   34 |     cin >> vec.at(i);
      |            ^~~
a.cc:39:37: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   39 |       for(int j = 1;j <= W + 2;j++) 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:40:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   40 |       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:40:15: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   40 |       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:42:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   42 |       cout << "#" << vec.at(i) << "#" << 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:42:22: error: 'vec' was not declared in this scope
   42 |       cout << "#" << vec.at(i) << "#" << endl;
      |                      ^~~
a.cc:42:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   42 |       cout << "#" << vec.at(i) << "#" << endl;
      |                                          ^~~~
      |                                          std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~