Language: C++

#include<bits/stdc++.h>
using namespace std;
int a[12];
int sum=0;
int array[10];
void ass(int lv)
{
	if(lv==3)
	{
		if(sum==7)
		{
			printf("%d",a[0]);
			if(array[0]==0)
			printf("+");
			else if(array[0]==1)
			printf("-");
			printf("%d",a[1]);
			if(array[1]==0)
			printf("+");
			else if(array[1]==1)
			printf("-");
			printf("%d",a[2]);
			if(array[2]==0)
			printf("+");
			else if(array[2]==1)
			printf("-");
			printf("%d",a[3]);
			printf("=7");
			return;
		}
	}
	
	for(int i=0;i<2;i++)
	{
		array[lv]=i;
		if(i==0)
		sum+=a[lv];
		ass(lv+1);
		sum-=a[lv];
	}
	
	return;
}

main()
{
	char in[1233];
	priority_queue<int> q;
	int n,k,m,i,j,len;
	int flag=0;
	
	scanf("%s",in);
	a[0]=in[0]-'0';
	a[1]=in[1]-'0';
	a[2]=in[2]-'0';
	a[3]=in[3]-'0';
	sum=a[0];
	ass(0);
}

Compiler output:
a.cc: In function 'void ass(int)':
a.cc:13:28: error: reference to 'array' is ambiguous
   13 |                         if(array[0]==0)
      |                            ^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:5:5: note:                 'int array [10]'
    5 | int array[10];
      |     ^~~~~
a.cc:15:33: error: reference to 'array' is ambiguous
   15 |                         else if(array[0]==1)
      |                                 ^~~~~
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:5:5: note:                 'int array [10]'
    5 | int array[10];
      |     ^~~~~
a.cc:18:28: error: reference to 'array' is ambiguous
   18 |                         if(array[1]==0)
      |                            ^~~~~
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:5:5: note:                 'int array [10]'
    5 | int array[10];
      |     ^~~~~
a.cc:20:33: error: reference to 'array' is ambiguous
   20 |                         else if(array[1]==1)
      |                                 ^~~~~
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:5:5: note:                 'int array [10]'
    5 | int array[10];
      |     ^~~~~
a.cc:23:28: error: reference to 'array' is ambiguous
   23 |                         if(array[2]==0)
      |                            ^~~~~
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:5:5: note:                 'int array [10]'
    5 | int array[10];
      |     ^~~~~
a.cc:25:33: error: reference to 'array' is ambiguous
   25 |                         else if(array[2]==1)
      |                                 ^~~~~
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:5:5: note:                 'int array [10]'
    5 | int array[10];
      |     ^~~~~
a.cc:35:17: error: reference to 'array' is ambiguous
   35 |                 array[lv]=i;
      |                 ^~~~~
/usr/include/c++/14/bits/stl_pair.h:99:12: note: candidates are: 'template<class _Tp, long unsigned int _Nm> struct std::array'
   99 |     struct array;
      |            ^~~~~
a.cc:5:5: note:                 'int array [10]'
    5 | int array[10];
      |     ^~~~~
a.cc: At global scope:
a.cc:45:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   45 | main()
      | ^~~~