Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string S;
  cin >> S;
  int A,B;
  A=stoi(&S[0],&S[4]);
  B=stoi(&S[5],&S[7]);
  if(A>2019)cout << "TBD" << endl;
  else if(A<2019)cout << "Heisei" << endl;
  else if(B>4)cout << "TBD" << endl;
  else if(B<5)cout << "Heisei" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type*, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type*)'
    7 |   A=stoi(&S[0],&S[4]);
      |     ~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:37: note:   no known conversion for argument 2 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type*' {aka 'char*'} to 'std::size_t*' {aka 'long unsigned int*'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |                             ~~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type*' {aka 'char*'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
a.cc:8:9: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type*, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type*)'
    8 |   B=stoi(&S[5],&S[7]);
      |     ~~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:37: note:   no known conversion for argument 2 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type*' {aka 'char*'} to 'std::size_t*' {aka 'long unsigned int*'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |                             ~~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type*' {aka 'char*'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~