Language: C++

#include <iostream>
#include <stdlib.h> 

int main(void){
  char a,b,c;
  cin >> a >> b >> c;
  if(b=='+'){
    cout << atoi(a) + atoi(c) << endl;
  }else{
    cout << atoi(a) - atoi(c) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> a >> b >> c;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << atoi(a) + atoi(c) << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:18: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    8 |     cout << atoi(a) + atoi(c) << endl;
      |                  ^
      |                  |
      |                  char
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/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:28: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    8 |     cout << atoi(a) + atoi(c) << endl;
      |                            ^
      |                            |
      |                            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:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout << atoi(a) + atoi(c) << endl;
      |                                  ^~~~
      |                                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout << atoi(a) - atoi(c) << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:18: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   10 |     cout << atoi(a) - atoi(c) << endl;
      |                  ^
      |                  |
      |                  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:10:28: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   10 |     cout << atoi(a) - atoi(c) << endl;
      |                            ^
      |                            |
      |                            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:10:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |     cout << atoi(a) - atoi(c) << endl;
      |                                  ^~~~
      |                                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~