Language: C++

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

int main(){
    char c[4];
    cin >> c;
    int a = atoi(c[0]), b = atoi(c[1]), c = atoi(c[2]), d = atoi(c[3]);
    if(a+b+c+d == 7){
        cout << a << '+' << b << '+' << c << '+' << d << "=7";
    }else if(a+b+c-d == 7){
        cout << a << '+' << b << '+' << c << '-' << d << "=7";
    }else if(a+b-c+d == 7){
        cout << a << '+' << b << '-' << c << '+' << d << "=7";
    }else if(a+b-c-d == 7){
        cout << a << '+' << b << '-' << c << '-' << d << "=7";
    }else if(a-b+c+d == 7){
        cout << a << '-' << b << '+' << c << '+' << d << "=7";
    }else if(a-b+c-d == 7){
        cout << a << '-' << b << '+' << c << '-' << d << "=7";
    }else if(a-b-c+d == 7){
        cout << a << '-' << b << '-' << c << '+' << d << "=7";
    }else{
        cout << a << '-' << b << '-' << c << '-' << d << "=7";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    7 |     int a = atoi(c[0]), b = atoi(c[1]), c = atoi(c[2]), d = atoi(c[3]);
      |                  ~~~^
      |                     |
      |                     char
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:7:37: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    7 |     int a = atoi(c[0]), b = atoi(c[1]), c = atoi(c[2]), d = atoi(c[3]);
      |                                  ~~~^
      |                                     |
      |                                     char
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:7:41: error: conflicting declaration 'int c'
    7 |     int a = atoi(c[0]), b = atoi(c[1]), c = atoi(c[2]), d = atoi(c[3]);
      |                                         ^
a.cc:5:10: note: previous declaration as 'char c [4]'
    5 |     char c[4];
      |          ^
a.cc:7:53: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    7 |     int a = atoi(c[0]), b = atoi(c[1]), c = atoi(c[2]), d = atoi(c[3]);
      |                                                  ~~~^
      |                                                     |
      |                                                     char
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:7:69: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    7 |     int a = atoi(c[0]), b = atoi(c[1]), c = atoi(c[2]), d = atoi(c[3]);
      |                                                                  ~~~^
      |                                                                     |
      |                                                                     char
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:8:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(a+b+c+d == 7){
      |        ~~~~~~~~^~~~
a.cc:10:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     }else if(a+b+c-d == 7){
      |              ~~~~~~~~^~~~
a.cc:12:17: error: invalid operands of types 'int' and 'char [4]' to binary 'operator-'
   12 |     }else if(a+b-c+d == 7){
      |              ~~~^~
      |               |  |
      |               |  char [4]
      |               int
a.cc:14:17: error: invalid operands of types 'int' and 'char [4]' to binary 'operator-'
   14 |     }else if(a+b-c-d == 7){
      |              ~~~^~
      |               |  |
      |               |  char [4]
      |               int
a.cc:16:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     }else if(a-b+c+d == 7){
      |              ~~~~~~~~^~~~
a.cc:18:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     }else if(a-b+c-d == 7){
      |              ~~~~~~~~^~~~
a.cc:20:17: error: invalid operands of types 'int' and 'char [4]' to binary 'operator-'
   20 |     }else if(a-b-c+d == 7){
      |              ~~~^~
      |               |  |
      |               |  char [4]
      |               int