Language: C++

#include<bits/stdc++.h>
using namespace std;
char s[15];
long long cof[15],n,data[15],pow_10[10],cnt,cou=0;
void gen(long long lv)
{
	if(lv==n-1)
	{
		data[n-1]=1;
		/*for(int i=0;i<n-1;i++)
		{
			printf("%lld ",data[i]);
		}
		printf("\n");*/
		cnt=0;
		for(int i=n-1;i>=0;i--)
		{
			if(data[i]==1)
			{
				cnt=0;
			}else
			{
				++cnt;
			}
			cof[i]=cnt;
		}
		/*for(int i=0;i<n;i++)
		{
			printf("%lld ",cof[i]);
		}
		printf("\n");*/
		for(int i=0;i<n;i++)
		{
			cou+=(pow_10[cof[i]]*(s[i]-48));
		}
		return;
	}
	for(int i=0;i<=1;i++)
	{
		data[lv]=i;
		gen(lv+1);
	}
}
int main()
{
	pow_10[0]=1;
	for(int i=1;i<=10;i++)
	{
		pow_10[i]=pow_10[i-1]*10;
	}
	scanf("%s",s);
	n=strlen(s);
	gen(0);
	printf("%lld\n",cou);
}

Compiler output:
a.cc: In function 'void gen(long long int)':
a.cc:9:17: error: reference to 'data' is ambiguous
    9 |                 data[n-1]=1;
      |                 ^~~~
In file included from /usr/include/c++/14/string:53,
                 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/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:4:21: note:                 'long long int data [15]'
    4 | long long cof[15],n,data[15],pow_10[10],cnt,cou=0;
      |                     ^~~~
a.cc:18:28: error: reference to 'data' is ambiguous
   18 |                         if(data[i]==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:4:21: note:                 'long long int data [15]'
    4 | long long cof[15],n,data[15],pow_10[10],cnt,cou=0;
      |                     ^~~~
a.cc:40:17: error: reference to 'data' is ambiguous
   40 |                 data[lv]=i;
      |                 ^~~~
/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:4:21: note:                 'long long int data [15]'
    4 | long long cof[15],n,data[15],pow_10[10],cnt,cou=0;
      |                     ^~~~