Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;

bool find7(int a, int b, vector<char> &operator) {
    if (a+b == 7) {
        operator.at(2) = '+';
        return true;
    }
    else (a-b == 7) {
        operator.at(2) = '-';
        return true;
    }
}

bool find7(int a, int b, int c, vector<char> &operator) {
    if find7(a+b, c, operator) {
        operator.at(1) = '+';
        return true;
    }
    else if find7(a-b, c, operator) {
        operator.at(1) = '-';
        return true;
    }
    else return false;
}

void find7(int a, int b, int c, int d, vector<char> &operator) {
    if find7(a+b, c, d, operator) {
        operator.at(0) = '+';
        return;
    }
    if find(a-b, c, d, operator) {
        operator.at(0) = '-';
        return;
    }
}

int main() {
    vector<char> operator(3);
    string s;
    cin >> s;
    int a = (int)s.at(0), b = (int)s.at(1), c = (int)s.at(2), d = (int)s.at(3);
    find7(a,b,c,d, operator);
    cout << a << operator.at(0) << b << operator.at(1) << c << operator.at(2) << d << "=7" << endl;
}

Compiler output:
a.cc:5:40: error: expected ')' before 'operator'
    5 | bool find7(int a, int b, vector<char> &operator) {
      |           ~                            ^~~~~~~~
      |                                        )
a.cc:5:40: error: expected initializer before 'operator'
    5 | bool find7(int a, int b, vector<char> &operator) {
      |                                        ^~~~~~~~
a.cc:16:47: error: expected ')' before 'operator'
   16 | bool find7(int a, int b, int c, vector<char> &operator) {
      |           ~                                   ^~~~~~~~
      |                                               )
a.cc:16:47: error: expected initializer before 'operator'
   16 | bool find7(int a, int b, int c, vector<char> &operator) {
      |                                               ^~~~~~~~
a.cc:28:54: error: expected ')' before 'operator'
   28 | void find7(int a, int b, int c, int d, vector<char> &operator) {
      |           ~                                          ^~~~~~~~
      |                                                      )
a.cc:28:54: error: expected initializer before 'operator'
   28 | void find7(int a, int b, int c, int d, vector<char> &operator) {
      |                                                      ^~~~~~~~
a.cc: In function 'int main()':
a.cc:40:26: error: expected type-specifier before '(' token
   40 |     vector<char> operator(3);
      |                          ^
a.cc:44:28: error: expected type-specifier before ')' token
   44 |     find7(a,b,c,d, operator);
      |                            ^
a.cc:44:5: error: 'find7' was not declared in this scope
   44 |     find7(a,b,c,d, operator);
      |     ^~~~~
a.cc:45:26: error: expected type-specifier before '.' token
   45 |     cout << a << operator.at(0) << b << operator.at(1) << c << operator.at(2) << d << "=7" << endl;
      |                          ^
a.cc:45:49: error: expected type-specifier before '.' token
   45 |     cout << a << operator.at(0) << b << operator.at(1) << c << operator.at(2) << d << "=7" << endl;
      |                                                 ^
a.cc:45:72: error: expected type-specifier before '.' token
   45 |     cout << a << operator.at(0) << b << operator.at(1) << c << operator.at(2) << d << "=7" << endl;
      |                                                                        ^