Language: C++

#include<iostream>

#define N 1000000000

using namespace std;

int data[N];

int check(int n, int keta){
  for(int i = 0; i < keta; i++){
    if(n%10 == 4 || n%10 == 6) return 0;
    n/=10;
  }
  return 1;
}

void make(){
  int num = 0;
  int keta = 1;

  for(int i = 0; i < N; i++){
    num++;
    if(num == 10) keta++;
    if(num == 100) keta++;
    if(num == 1000) keta++;
    if(num == 10000) keta++;
    if(num == 100000) keta++;
    if(num == 1000000) keta++;
    if(num == 10000000) keta++;
    if(num == 100000000) keta++;
    if(check(num,keta)) data[i] = num;
    else i--;
  }
}

int main(){
  make();
  int in;
  while(cin >> in && in) cout << data[in-1] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'void make()':
a.cc:31:25: error: reference to 'data' is ambiguous
   31 |     if(check(num,keta)) data[i] = num;
      |                         ^~~~
In file included from /usr/include/c++/14/string:53,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:7:5: note:                 'int data [1000000000]'
    7 | int data[N];
      |     ^~~~
a.cc: In function 'int main()':
a.cc:39:34: error: reference to 'data' is ambiguous
   39 |   while(cin >> in && in) cout << data[in-1] << endl;
      |                                  ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:7:5: note:                 'int data [1000000000]'
    7 | int data[N];
      |     ^~~~