Language: C++

#include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <numeric>
#include <list>
#include <assert.h>
#include <math.h>
#include <valarray>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <complex>
#include <list>

using namespace std;
typedef long long int LL;
typedef pair<long long int, long long int> pii;
typedef pair<double, double> pdd;

#define SORT(c) sort((c).begin(),(c).end())
#define BACKSORT(c) sort((c).begin(),(c).end(),std::greater<LL>())
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

int ???(string& s, int& i);
int ???(string& s, int& i);
int ?????°(string& s, int& i);
int ??°(string& s, int& i);

int ???(string& s,int& i) {
	int a = ???(s, i);
	while (s[i] == '+' || s[i] == '-') {
		char op = s[i];
		i++;
		int b = ???(s, i);
		if (op == '+') {
			a = a+b;
		}
		else {
			a = a - b;
		}
	}
	return a;
}

int ???(string& s, int& i) {
	int a = ?????°(s, i);
	while (s[i] == '*' || s[i] == '/') {
		char op = s[i];
		i++;
		int b = ?????°(s, i);
		if (op == '*') {
			a = a*b;
		}
		else {
			a = a / b;
		}
	}
	return a;
}

int ?????°(string& s, int& i) {
	if (isdigit(s[i])) {
		int a = ??°(s, i);
		return a;
	}
	else {
		i++;//(
		int a = ???(s, i);
		i++;//)
		return a;
	}
}

int ??°(string& s, int& i) {
	int a = s[i]-'0';
	i++;
	while (isdigit(s[i])) {
		a = a * 10 + (s[i] - '0');
		i++;
	}
	return a;
}

int main()
{
	int n;
	cin >> n;
	REP(j, n) {
		string ss;
		cin >> ss;
		int k = 0;
		cout << ???(ss, k) << endl;
	}

}

Compiler output:
a.cc:33:6: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
   33 | int ???(string& s, int& i);
a.cc:34:6: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
   34 | int ???(string& s, int& i);
a.cc:35:10: error: extended character ° is not valid in an identifier
   35 | int ?????°(string& s, int& i);
      |          ^
a.cc:36:7: error: extended character ° is not valid in an identifier
   36 | int ??°(string& s, int& i);
      |       ^
a.cc:38:6: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
   38 | int ???(string& s,int& i) {
a.cc:39:18: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
   39 |         int a = ???(s, i);
a.cc:43:26: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
   43 |                 int b = ???(s, i);
a.cc:54:6: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
   54 | int ???(string& s, int& i) {
a.cc:55:22: error: extended character ° is not valid in an identifier
   55 |         int a = ?????°(s, i);
      |                      ^
a.cc:59:30: error: extended character ° is not valid in an identifier
   59 |                 int b = ?????°(s, i);
      |                              ^
a.cc:70:10: error: extended character ° is not valid in an identifier
   70 | int ?????°(string& s, int& i) {
      |          ^
a.cc:72:27: error: extended character ° is not valid in an identifier
   72 |                 int a = ??°(s, i);
      |                           ^
a.cc:77:26: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
   77 |                 int a = ???(s, i);
a.cc:83:7: error: extended character ° is not valid in an identifier
   83 | int ??°(string& s, int& i) {
      |       ^
a.cc:101:26: warning: trigraph ??( ignored, use -trigraphs to enable [-Wtrigraphs]
  101 |                 cout << ???(ss, k) << endl;
a.cc:33:5: error: expected unqualified-id before '?' token
   33 | int ???(string& s, int& i);
      |     ^
a.cc:34:5: error: expected unqualified-id before '?' token
   34 | int ???(string& s, int& i);
      |     ^
a.cc:35:5: error: expected unqualified-id before '?' token
   35 | int ?????°(string& s, int& i);
      |     ^
a.cc:36:5: error: expected unqualified-id before '?' token
   36 | int ??°(string& s, int& i);
      |     ^
a.cc:38:5: error: expected unqualified-id before '?' token
   38 | int ???(string& s,int& i) {
      |     ^
a.cc:54:5: error: expected unqualified-id before '?' token
   54 | int ???(string& s, int& i) {
      |     ^
a.cc:70:5: error: expected unqualified-id before '?' token
   70 | int ?????°(string& s, int& i) {
      |     ^
a.cc:83:5: error: expected unqualified-id before '?' token
   83 | int ??°(string& s, int& i) {
      |     ^
a.cc: In function 'int main()':
a.cc:101:25: error: expected primary-expression before '?' token
  101 |                 cout << ???(ss, k) << endl;
      |                         ^
a.cc:101:26: error: expected primary-expression before '?' token
  101 |                 cout << ???(ss, k) << endl;
      |                          ^
a.cc:101:27: error: expected primary-expression before '?' token
  101 |                 cout << ???(ss, k) << endl;
      |                           ^
a.cc:101:36: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
  101 |                 cout << ???(ss, k) << endl;
      |                            ~~~~~~~~^~~~~~~
a.cc:101:43: error: expected ':' before ';' token
  101 |                 cout << ???(ss, k) << endl;
      |                                           ^
      |                                           :
a.cc:101:43: error: expected primary-expression before ';' token
a.cc:101:43: error: expected ':' before ';' token
  101 |                 cout << ???(ss, k) << endl;
      |                                           ^
      |                                           :
a.cc:101:43: error: expected primary-expression before ';' token
a.cc:101:43: error: expected ':' before ';' token
  101 |                 cout << ???(ss, k) << endl;
      |                                           ^
      |                                           :
a.cc:101:43: error: expected primary-expression before ';' token