Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
typedef long long ll;

int main(){
    int i, j, k, tem, a, b, c, d;
    int opn[2] = {1, -1};
    char op[2] =  {'+', '-'};
    string s;
    cin >> s;
    a = atoi(s[0]); b = atoi(s[1]); c = atoi(s[2]); d = atoi(s[3]);
    for(i=0; i<2; i++){
        for(j=0; j<2; j++){
            for(k=0; k<2; k++){
                if(a + opn[i]*b + opn[j]*c + opn[k]*d == 7){
                    cout << a << op[i] << b << op[j] << c << op[k] << d << "=7";
                }
            }
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   12 |     a = atoi(s[0]); b = atoi(s[1]); c = atoi(s[2]); d = atoi(s[3]);
      |         ~~~~^~~~~~
      |             |
      |             __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka 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:12:29: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   12 |     a = atoi(s[0]); b = atoi(s[1]); c = atoi(s[2]); d = atoi(s[3]);
      |                         ~~~~^~~~~~
      |                             |
      |                             __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka 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:12:45: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   12 |     a = atoi(s[0]); b = atoi(s[1]); c = atoi(s[2]); d = atoi(s[3]);
      |                                         ~~~~^~~~~~
      |                                             |
      |                                             __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka 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:12:61: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   12 |     a = atoi(s[0]); b = atoi(s[1]); c = atoi(s[2]); d = atoi(s[3]);
      |                                                         ~~~~^~~~~~
      |                                                             |
      |                                                             __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~