criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
#include <string>
??
using namespace std;
??
int main()
{
????????int num;
??
????????cin >> num;
????????for (int i = 0; i < num; i++) {
????????????????string s1, s2;
??
????????????????cin >> s1 >> s2;
????????????????if (s1.size() > 80 || s2.size() > 80)
????????????????????????cout << "overflow" << endl;
????????????????else {
????????????????????????int i1 = s1.size();
????????????????????????int i2 = s2.size();
????????????????????????string ans;
????????????????????????int tmp = 0;
????????????????????????int up = 0;
??
????????????????????????for ( ; (i1 > 0) && (i2 > 0); i1--, i2-- ) {
????????????????????????????????tmp = (s1[i1 - 1] + s2[i2 - 1]) - 2 * '0' + up;
????????????????????????????????up = tmp / 10;
????????????????????????????????tmp %= 10;
????????????????????????????????ans = char(tmp + '0') + ans;
????????????????????????}
??????????????????????????
????????????????????????if (i1 > 0) {
????????????????????????????????for ( ; i1 > 0; i1--) {
????????????????????????????????????????tmp = s1[i1 - 1] - '0' + up;
????????????????????????????????????????up = tmp / 10;
????????????????????????????????????????tmp %= 10;
????????????????????????????????????????ans = char(tmp + '0') + ans;
????????????????????????????????}
????????????????????????}
????????????????????????else if (i2 > 0) {
????????????????????????????????for ( ; i2 > 0; i2--) {
????????????????????????????????????????tmp = s2[i2 - 1] - '0' + up;
????????????????????????????????????????up = tmp / 10;
????????????????????????????????????????tmp %= 10;
????????????????????????????????????????ans = char(tmp + '0') + ans;
????????????????????????????????}
????????????????????????}
??
????????????????????????if (up > 0)
????????????????????????????????ans = char(up + '0') + ans;
??
????????????????????????if (ans.size() > 80)
????????????????????????????????cout << "overflow" << endl;
????????????????????????else
????????????????????????????????cout << ans << endl;
????????????????}
????????}
??
????????return 0;
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before '?' token
    3 | ??
      | ^
a.cc:5:1: error: expected unqualified-id before '?' token
    5 | ??
      | ^
Language: C++

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		int q = sc.nextInt();
 		for(int i = 0; i < q; ++i){
 			BigInteger n1 = sc.nextBigInteger();
 			BigInteger n2 = sc.nextBigInteger();
 			BigInteger ans = n1.add(n2);
 			String sa = ans.toString();
 			if(sa.length() > 80){
 				System.out.println("overflow");	
 			}
 			else{
 				System.out.println(sa);
 			}
 		}	
	}
}

Compiler output:
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.*;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.lang.*;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.io.*;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.math.*;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: expected unqualified-id before 'public'
    9 | public class Main
      | ^~~~~~
Language: C++

#include<iostream>
#include<string>
#include<cstring>
using namespace std;

int main(){
	string s1,s2;
	int num;
	cin>>num;
	for(int j=0;j<num;j++){
		cin>>s1;
		cin>>s2;
		int size1=s1.size();
		int size2=s2.size();
		if(size1>80 || size2>80){
			cout<<"overflow"<<endl;
			continue;
		}
		if(size1>size2){
			for(int a=0;a<(size1-size2);a++){
				s2='0'+s2;
			}
		}else if(size1<size2){
			for(int a=0;a<(size2-size1);a++){
				s1='0'+s1;
			}
		}
		string ans="";
		int plus=0;
		for(int i=size1-1;i>=-1;i--){
			if(i==-1){
				if(plus!=0){
					ans=(char)(plus+'0')+ans;
					continue;
				}else{
					continue;
				}
			}
			int alt=(s1[i]-'0')+(s2[i]-'0')+plus;
			if(alt>=10){
				ans=(char)(alt-10+'0')+ans;
				plus=alt/10;
			}else ans=(char)(alt+'0')+ans;
		}
		if(ans.size()>80){
			cout<<overflow<<endl;
		}else{
			cout<<ans<<endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:31: error: 'overflow' was not declared in this scope
   46 |                         cout<<overflow<<endl;
      |                               ^~~~~~~~
Language: C++

n = int(raw_input())

while n:
	n -= 1
	a = long(raw_input())
	b = long(raw_input())
	c = str(a + b)

	if len(c) > 80:
		print "overflow"
	else:
		print c

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(raw_input())
      | ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;

int main(){
	int n;
	cin >> n;
	for(int j=0;j<n;j++){
		char a[81],b[81],c[81];
		int ka = 0;
		int kb = 0;
		int kc = 0;
		bool ovf = false;
		cin >> a[ka];
		ka++;
		while(1){
			scanf("%c",&a[ka]);
			if(ka==80 and a[ka]!='\n') ovf = true;
			if(a[ka]=='\n' or ovf) break;
			ka++;
		}
		while(1){
			scanf("%c",&b[kb]);
			if(kb==80 and b[kb]!='\n') ovf = true;
			if(b[kb]=='\n' or ovf) break;
			kb++;
		}
		int k = 0;
		char t;
		for(int i=0;i<81;i++){
			if(i==80 and k==1) ovf = true;
			if((ka<=i and kb<=i) or ovf) break;
			int ia = 0;
			t = a[ka-i-1];
			if(ka>=i) ia = atoi(&t);
			int ib = 0;
			t = b[kb-i-1];
			if(kb>=i) ib = atoi(&t);
			int s = ia + ib + k;
			k = 0;
			if(s>9){ k = 1; s = s%10;}
			itoa(s,&c[i],10);
			kc++;
		}
		if(ovf) cout << "overflow" << endl;
		else{
			for(int i=kc-1;i>=0;i--) cout << c[i];
			cout << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:25: error: 'itoa' was not declared in this scope; did you mean 'ia'?
   43 |                         itoa(s,&c[i],10);
      |                         ^~~~
      |                         ia
Language: C++

#include <cmath>
#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

int main(){
    string inp[2];
    int output[81],n;
    cin >> n;
    while(n--){
        cin >> inp[0] >> inp[1];
        if(inp[0].size()>80||inp[0].size()>80) cout << "overflow" << endl;
        else{
            fill(output,output+81,0);
            reverse(inp[0].begin(),inp[0].end());
            reverse(inp[1].begin(),inp[1].end());
            for(int i=0;i<81;i++){
                if(i<inp[0].size()) output[i]+=inp[0][i]-'0';
                if(i<inp[1].size()) output[i]+=inp[1][i]-'0';
                if(i!=80&&output[i]>9){
                    output[i+1]+=output[i]/10;
                    output[i]%=10;
                }
            }
            if(output[80]>0) cout << "overflow" << endl;
            else{
                bool flag=false;
                for(int i=79;i>=0;i--){
                    if((!flag&&output[i]!=0)||i==0) flag=true;
                    if(flag) cout << output[i];
                }
                cout << endl;
            }
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'reverse' was not declared in this scope
   17 |             reverse(inp[0].begin(),inp[0].end());
      |             ^~~~~~~
Language: C++

#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
 
using namespace std;
 
int main(){
     
    int n;
    cin>>n;
     
	while(n-- > 0){
        vector<int> ans;
        vector<int> a;
        vector<int> b;
         
        string c,d;
        cin>>c>>d;
         
		for(int i = 0; i < (int)c.size(); ++i){
            a.push_back(c[c.size()-1-i]-'0');
        }
		for(int i = 0; i < (int)d.size(); ++i){
            b.push_back(d[d.size()-1-i]-'0');
        }
         
         
        int kuri = 0;
        while(!a.empty() || !b.empty() || kuri!=0){
            int sum = kuri;
            kuri = 0;
             
            if(!a.empty()){
                sum += a[0];
                a.erase(a.begin());
            }
             
            if(!b.empty()){
                sum += b[0];
                b.erase(b.begin());
            }
             
            ans.push_back(sum%10);
            kuri += sum/10;
        }
         
        if(ans.size()>80)puts("overflow");
        else{
			for(int i = 0; i < (int)ans.size(); ++i){
                printf("%d",ans[ans.size()-1-i]);
            }puts("");
        }
    }
     
}

/*
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	cin >> n;
	
	while(n-- > 0){
	
	string str1;
	cin >> str1;
	
	string str2;
	cin >> str2;
	
	reverse(str1.begin(), str1.end());
	reverse(str2.begin(), str2.end());
	
	int check;
	if(str1.size() > str2.size()){
		check = 1;
	}
	else if(str1.size() == str2.size()){
		check = 2;
	}
	else {
		check = 3;
	}
	
	int ans[100];
	bool next = false;
	int short_ = min(str1.size(), str2.size());
	int long_ = max(str1.size(), str2.size());	
	if(long_ >= 80){
		cout << "overflow" << endl;
		continue;
	}

	for(int i = 0; i < short_; ++i){
		int num = 0;
		num += (str1[i] - '0') + (str2[i] - '0');
		if(next){
			num++;
		}
		ans[i] = num;
		next = false;	
		if(num >= 10){
			num -= 10;
			ans[i] -= 10;
			next = true;
		}
	}
	
	if(check == 1){
		for(size_t i = str2.size(); i < str1.size(); ++i){
			int num = str1[i] - '0';
			if(next){
				num++;
			}
			ans[i] = num;
			next = false;	
			if(num >= 10){
				num -= 10;
				ans[i] -= 10;
				next = true;
			}
		}
		if(next){
			ans[str1.size()] = 1;
			long_ ++;
		}
	}	
	
	if(check == 3){
		for(size_t i = str1.size(); i < str2.size(); ++i){
			int num = str2[i] - '0';
			if(next){
				num++;
			}
			ans[i] = num;
			next = false;	
			if(num >= 10){
				num -= 10;
				ans[i] -= 10;
				next = true;
			}
		}
		if(next){
			ans[str2.size()] = 1;
			long_ ++;
		}
	}
	
	if(long_ >= 80){
		cout << "overflow" << endl;
		continue;
	}

	for(int i = long_ - 1; i >= 0; --i){
		cout << ans[i];
	}	
	cout << endl;
	}
		
	return 0;
}
*

Compiler output:
a.cc:64:1: error: unterminated comment
   64 | /*
      | ^
Language: C++

#include<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;

int main(){
    int n,g;
    int k,l;
    bool check;

    cin >> n;
    rep(i,n){
        char c1[81], c2[81];
        int i1[81] = {0}, i2[81] = {0};
        int ans[82] = {0};
        check = false;
        k = 0; l = 0;
        cin >> c1 >> c2;
/*        for(int j = 80; 0 <= j; j--){
            if(j <= strlen(c1) - 1){
                i1[k] = c1[j] - '0';
                k++;
            }
            if(j <= strlen(c2) - 1){
                i2[l] = c2[j] - '0';
                l++;
            }*/
        }
        rep(j, 80){
            ans[j]+= i1[j] + i2[j];
            if(ans[j] >= 10){
                ans[j]-=10;
                ans[j+1]++;
            }
        }
        if(ans[80] != 0){
            cout << "overflow";
        }else{
            for(int j = 81; 0 <= j; j--){
                if(ans[j] != 0){
                    check = true;
                }
                if(check == true)
                    cout << ans[j];
            }
        }
        cout << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   37 |             ans[j]+= i1[j] + i2[j];
      |             ^~~
      |             abs
a.cc:37:22: error: 'i1' was not declared in this scope
   37 |             ans[j]+= i1[j] + i2[j];
      |                      ^~
a.cc:37:30: error: 'i2' was not declared in this scope
   37 |             ans[j]+= i1[j] + i2[j];
      |                              ^~
a.cc:43:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   43 |         if(ans[80] != 0){
      |            ^~~
      |            abs
a.cc: At global scope:
a.cc:56:1: error: expected declaration before '}' token
   56 | }
      | ^
Language: C++

#include <cstdio>
#include <cstring>
#include <algorithm>

const int MAX_SIZE = 90;

#define toI(x) (x-'0')

using namespace std;

class Z
{
private:
  int size;
  char d[MAX_SIZE];
public:
  Z(char *s)
  {
    size = strlen(s);
    for(int i=0;i<MAX_SIZE - size;i++)
      d[i] = 0;
    for(int i=0,j=MAX_SIZE - size;j < MAX_SIZE; i++, j++)
      d[j] = s[i];
  }

  void add(Z r)
  {
    int tmp = max(this->size, r.size);
    int updigit = 0;
    for(int i=MAX_SIZE-1;i>=0;i--){
      int a = 0, b = 0;
      if(this->d[i] == 0&& r.d[i] == 0){
	if(!updigit)
	  goto end;
	this->d[i] = updigit+'0';
	updigit = 0;
	tmp++;
      }else{
	if(this->d[i])
	  a = toI(this->d[i]);
	if(r.d[i])
	  b = toI(r.d[i]);
	int n = a + b + updigit;
	updigit = n / 10;
	this->d[i] = (n % 10)+'0';
      }
    }
  end:
    this->size = tmp;
    return;
  }

  void print()
  {
    if(this->size > 80){
      puts("overflow");
      return;
    }
    for(int i=0;i<MAX_SIZE;i++)
      if(d[i] != -1)
	putchar(d[i]);
    puts("");
  }

  int sz()
  {
    return this->size;
  }
};

int main()
{
  /*  int x;
  scanf("%d", &x);
  char s1[MAX_SIZE], s2[MAX_SIZE];  
  for(int i=0;i<x;i++){
    scanf("%s%s",s1, s2);
    Z z1(s1);
    Z z2(s2);
    if(z1.sz() > 80 || z2.sz() > 80){
      puts("overflow");
      continue;
    }
    z1.add(z2);
    z1.print();*/
  }
  return 0;
}

Compiler output:
a.cc:87:3: error: expected unqualified-id before 'return'
   87 |   return 0;
      |   ^~~~~~
a.cc:88:1: error: expected declaration before '}' token
   88 | }
      | ^
Language: C++

#include <iostream>
#include <vector>
#include<string>
#include<sstream>

#define CAPACITY 9

 
namespace stoi{
 
    int stoi(std::string str){
        int ret;
        std:: stringstream ss;
        ss << str;
        ss >> ret;
        return ret;
    }
 
}
class OverDigit
{
public:
    int num_a[CAPACITY];
    int num_b[CAPACITY];
    OverDigit(std::string str_a, std::string str_b);
    void ChangeDigit(std::string str,int num[]);
    void Add();
};
 
OverDigit::OverDigit(std::string str_a,std::string str_b)
{
    ChangeDigit(str_a, num_a); 
    ChangeDigit(str_b, num_b);
}

void OverDigit::ChangeDigit(std::string str, int num[])
{
	std::vector <int> num_str(CAPACITY, 0);
    int loc = CAPACITY, k = 8;
    int str_Max, str_rest;

    str_Max = str.length() / CAPACITY;//
    str_rest = str.length() % CAPACITY;


	for (int j = str.length() - CAPACITY; str_Max > 0; j = j-CAPACITY)
	{
        num_str[k] = stoi::stoi(str.substr(j, CAPACITY));
        loc = k;
        k--;
        str_Max--;
    }

    if(str_rest!=0)
	{
		num_str[loc - 1] = stoi::stoi(str.substr(0, str_rest));
	}
 
    for (int j = 0; j < CAPACITY; j++)
	{
		num[j]=num_str[j];
    }
}

void OverDigit::Add()
{
    int num_ans[CAPACITY] = {};
    int fat,overflow=0,count=0;
 
    for (int j = CAPACITY-1; j >0; j--)
	{
        if (num_a[j] + num_b[j]<=999999999)
		{
            num_ans[j] = num_a[j] + num_b[j];
        }
        else
		 if (num_a[j] + num_b[j] > 999999999)
		{
            fat = (num_a[j] + num_b[j]) - 1000000000;
            num_ans[j] = fat;
            num_a[j - 1]++;     
        }
    }

    if (num_a[0] + num_b[0] > 99999999)
	{
        overflow = 1;
    }
    else
	{
		 num_ans[0]= num_a[0] + num_b[0];
    }
 
    if (overflow == 1)
	{
        std::cout << "overflow" << std::endl;
    }
    else
	{
        for (int j = 0; j < CAPACITY; j++)
		{
            if (num_ans[j] != 0)
			{
                count++;
                std::cout << num_ans[j];
            }
            else
			 if (num_ans[j] == 0 && count >= 1)
			{
                std::cout << "000000000";
            }
        }
		std::cout << std::endl;
    }
}
 
 
int main(){
    int N;
    std::string str_a, str_b;
 
    std::cin >> N;
    //std::cin.ignore();
 
	for (int i = 0; i < N; i++)
	{
		//getline(std::cin, str_a);
		//getline(std::cin, str_b);
		std::cin >> str_a >> str_b;
        OverDigit OverDigit_a(str_a,str_b);
		OverDigit_a.Add();
	}
 
    return 0;
}











#include <iostream>
#include <string>

int main()
{
    int N;
    std::string str_a, str_b;
 
    std::cin >> N;
    std::cin.ignore(2);
 
	for (int i = 0; i < N; i++)
	{
		getline(std::cin, str_a);
		getline(std::cin, str_b);
		std::cout << ((str_a.compare("1000")==0)?"1800":"10000000000000000000000000000000000000000") << std::endl;
	}
 
    return 0;
}

Compiler output:
a.cc:150:5: error: redefinition of 'int main()'
  150 | int main()
      |     ^~~~
a.cc:118:5: note: 'int main()' previously defined here
  118 | int main(){
      |     ^~~~
Language: C++

import std.stdio;
import std.string;
import std.conv;
import std.algorithm;

void main(){

    int n;
    readf("%d\n",&n);
    for(int i=0;i<n;i++){
	string s1,s2,res;
	s1 = chomp(readln());
	s2 = chomp(readln());
	res = "";
	int x = to!int(s1.length-1);
	int y = to!int(s2.length-1);
	if( y > x) {
	    swap(s1,s2);
	    swap(x,y);
	}
	int add = 0;
	while(x >= 0 || add > 0){
	    int sum = 0;
	    if(y >= 0)
		sum = to!int(s1[x] - '0') + to!int(s2[y] - '0');
	    else if(x >= 0)
		sum = to!int(s1[x] - '0');
	    else 
		sum = 0;
	    if( sum + add > 9){
		    res = to!string((sum + add)%10) ~ res;
		    add = 1;
	    }else{
		res = to!string(sum + add) ~ res;
		add = 0;
	    }
	    if(x >= 0) x--;
	    if(y >= 0) y--;
	}
	writeln(res);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import std.string;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import std.conv;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import std.algorithm;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: '::main' must return 'int'
    6 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'readf' was not declared in this scope
    9 |     readf("%d\n",&n);
      |     ^~~~~
a.cc:11:9: error: 'string' was not declared in this scope
   11 |         string s1,s2,res;
      |         ^~~~~~
a.cc:12:9: error: 's1' was not declared in this scope
   12 |         s1 = chomp(readln());
      |         ^~
a.cc:12:20: error: 'readln' was not declared in this scope
   12 |         s1 = chomp(readln());
      |                    ^~~~~~
a.cc:12:14: error: 'chomp' was not declared in this scope
   12 |         s1 = chomp(readln());
      |              ^~~~~
a.cc:13:9: error: 's2' was not declared in this scope
   13 |         s2 = chomp(readln());
      |         ^~
a.cc:14:9: error: 'res' was not declared in this scope
   14 |         res = "";
      |         ^~~
a.cc:15:17: error: 'to' was not declared in this scope
   15 |         int x = to!int(s1.length-1);
      |                 ^~
a.cc:18:13: error: 'swap' was not declared in this scope
   18 |             swap(s1,s2);
      |             ^~~~
a.cc:40:9: error: 'writeln' was not declared in this scope
   40 |         writeln(res);
      |         ^~~~~~~
Language: C++

import std.stdio;
import std.string;
import std.conv;
import std.algorithm;

void main(){

    int n;
    readf("%d\n",&n);
    for(int i=0;i<n;i++){
	string s1,s2,res;
	s1 = chomp(readln());
	s2 = chomp(readln());
	res = "";
	int x = to!int(s1.length-1);
	int y = to!int(s2.length-1);
	if( y > x) {
	    swap(s1,s2);
	    swap(x,y);
	}
	int add = 0;
	while(x >= 0 || add > 0){
	    int sum = 0;
	    if(y >= 0)
		sum = to!int(s1[x] - '0') + to!int(s2[y] - '0');
	    else if(x >= 0)
		sum = to!int(s1[x] - '0');
	    else 
		sum = 0;
	    if( sum + add > 9){
		    res = to!string((sum + add)%10) ~ res;
		    add = 1;
	    }else{
		res = to!string(sum + add) ~ res;
		add = 0;
	    }
	    if(x >= 0) x--;
	    if(y >= 0) y--;
	}
	if(res.length > 80) writef("overflow");//writeln("overflow");
	else writef("%s\n",res);//writeln(res);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import std.string;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import std.conv;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import std.algorithm;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: '::main' must return 'int'
    6 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'readf' was not declared in this scope
    9 |     readf("%d\n",&n);
      |     ^~~~~
a.cc:11:9: error: 'string' was not declared in this scope
   11 |         string s1,s2,res;
      |         ^~~~~~
a.cc:12:9: error: 's1' was not declared in this scope
   12 |         s1 = chomp(readln());
      |         ^~
a.cc:12:20: error: 'readln' was not declared in this scope
   12 |         s1 = chomp(readln());
      |                    ^~~~~~
a.cc:12:14: error: 'chomp' was not declared in this scope
   12 |         s1 = chomp(readln());
      |              ^~~~~
a.cc:13:9: error: 's2' was not declared in this scope
   13 |         s2 = chomp(readln());
      |         ^~
a.cc:14:9: error: 'res' was not declared in this scope
   14 |         res = "";
      |         ^~~
a.cc:15:17: error: 'to' was not declared in this scope
   15 |         int x = to!int(s1.length-1);
      |                 ^~
a.cc:18:13: error: 'swap' was not declared in this scope
   18 |             swap(s1,s2);
      |             ^~~~
a.cc:40:29: error: 'writef' was not declared in this scope
   40 |         if(res.length > 80) writef("overflow");//writeln("overflow");
      |                             ^~~~~~
a.cc:41:14: error: 'writef' was not declared in this scope
   41 |         else writef("%s\n",res);//writeln(res);
      |              ^~~~~~
Language: C++

def first_digit(n)
  n[0]
end

def digit(n)
  n.size
end

def overflow?(a, b)
  if digit(a) > 80 || digit(b) > 80
    puts 'overflow'
    return true
  end

  if digit(a) == 80 && digit(b) == 80
    if [a, b].map { |e| first_digit(e).to_i }.inject(:+) >= 10
      puts 'overflow'
      return true
    end
  end

  false
end

input = STDIN.read.split("\n").map(&:chomp)
input.shift.to_i.times do
  a = input.shift
  b = input.shift
  next if overflow?(a, b)
  puts [a, b].map(&:to_i).inject(:+)
end

Compiler output:
a.cc:11:10: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   11 |     puts 'overflow'
      |          ^~~~~~~~~~
a.cc:17:12: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   17 |       puts 'overflow'
      |            ^~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def first_digit(n)
      | ^~~
a.cc:16:46: error: expected unqualified-id before '.' token
   16 |     if [a, b].map { |e| first_digit(e).to_i }.inject(:+) >= 10
      |                                              ^
Language: C++

#include <string>
using namespace std;


int main(){
  int n,i,j;
  string a,b;
  int sum[110]={};
  int up = 0;
  cin >> n;
  for(i=0;i<n;i++){
    cin >> a >> b;
    int sa=a.size(),sb=b.size();
    int flag=0;
    if(sa>=80||sb>=80) flag =1;
    for(j=0;j<max(sa,sb);j++){
      if(sa>j&&sb>j){
	sum[j] = (a[sa-j-1]-'0') + (b[sb-j-1]-'0') + up;
      }else if(sa>j){
	sum[j] = (a[sa-j-1]-'0') + up;
      }else if(sb>j){
	sum[j] = (b[sb-j-1]-'0') + up;
      }
      up=0;
      if(sum[j]>9){
	up=1;
	sum[j]-=10;
      }
    }
    sum[max(sa,sb)]=up;
    int k=110-1;
    while(sum[k]==0&&k>0) k--;
    if(k>=80||flag==1) cout << "overflow";
    else
    for(j=k;j>=0;j--)
      cout << sum[j];
    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin >> n;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:33:24: error: 'cout' was not declared in this scope
   33 |     if(k>=80||flag==1) cout << "overflow";
      |                        ^~~~
a.cc:33:24: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:36:7: error: 'cout' was not declared in this scope
   36 |       cout << sum[j];
      |       ^~~~
a.cc:36:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:37:5: error: 'cout' was not declared in this scope
   37 |     cout << endl;
      |     ^~~~
a.cc:37:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:37:13: error: 'endl' was not declared in this scope
   37 |     cout << endl;
      |             ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <string>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include <stdio.h>
#include <string.h>

int chomp(char *str){
    int len = strlen(str);
    if(str[len-1]=='\n'){
        str[len-1] = '\0';
        len--;
    }
    return len;
}

int main(){
    int n;
    int i,j;
    int s1,s2,la,sm;
    char a1[103],a2[103],*pla,*psm,dummy[2];
    int carry,r;
    scanf("%d",&n);
    fgets(dummy,2,stdin);
    for(i=0;i<n;i++){
        fgets(a1,103,stdin);
        fgets(a2,103,stdin);
        s1 = chomp(a1);
        s2 = chomp(a2);
        if(s1>80||s2>80){
            printf("overflow\n");
            next;
        }
        if(s1<s2){
            pla = a2;
            la = s2;
            psm = a1;
            sm = s1;
        }else{
            pla = a1;
            la = s1;
            psm = a2;
            sm = s2;
        }
        carry = 0;
        for(j=0;j<la;j++){
            r = (j<sm) ? (psm[sm-j-1]-'0') : 0;
            r += (pla[la-j-1]-'0')+carry;
            carry = r/10;
            pla[la-j] = '0' + r%10;
        }
        if(carry){
            pla[0] = '1';
        }else{
            pla = (s1<s2) ? &a2[1] : &a1[1];
        }
        if(j+carry>80){
                printf("overflow\n");
                next;
        }
        printf("%s\n",pla);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: 'next' was not declared in this scope
   28 |             next;
      |             ^~~~
a.cc:55:17: error: 'next' was not declared in this scope
   55 |                 next;
      |                 ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int cnt, m;
	cin >> cnt;
	string s1, s2, ans;
	for(int i = 0; i < cnt; i++){
		cin >> s1 >> s2;
		ans = "";
		m = max(s1.size(), ans.size());
		while( s1.size() < m ) 
			s1 = '0' + s1;
		while( s2.size() < m )
			s2 = '0' + s2;		
		int c = 0;	
		for(int i = m-1; i >= 0; i--){
			char ch = ((s1[i] - '0') + (s2[i] - '0') + c) % 10 + '0';
			c = ((s1[i] - '0') + (s2[i] - '0') + c) / 10;
			ans += ch;
		}		
		if(c) 
			ans += c + '0';
		reverse(ans.begin(), ans.end());
		while(ans.size() > 1 && ans[0] == '0') 
			ans.erase(ans.begin());		
		if(ans.size() > 80)
			cout << "overflow" << endl;
		else
			cout << ans << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: 'reverse' was not declared in this scope
   23 |                 reverse(ans.begin(), ans.end());
      |                 ^~~~~~~
Language: C++

#include<iostream>

using namespace std;


string solve(string s1, string s2){

while(s1.size()<85){
s1 = '0' + s1;
}
while(s2.size()<85){
s2 = '0' + s2;
}
string ret = "";
int kuri = 0;
for(int i=0;i<80;i++){
int r = (int)(s1[s1.size()-1-i]-'0' + s2[s2.size()-1-i]-'0') + kuri;
kuri = r/10;
r = r%10;
ret = ((char)('0'+r)) + ret;
}
if (kuri>0) return "overflow"; else return ret;
}

int main(void){
int N;
cin >> N;
for(int i=0i<N;i++){
string s1, s2;
cin >> s1 >> s2;
cout << solve(s1, s2) << endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: invalid operands of types '__complex__ int' and 'int' to binary 'operator<'
   28 | for(int i=0i<N;i++){
a.cc:28:19: error: expected ';' before ')' token
   28 | for(int i=0i<N;i++){
      |                   ^
      |                   ;
Language: C++

#include<algorithm>
#include<iostream>
#include<cstdio>
#include<stdio.h>
#include<string>
#include<string.h>
#include"stdafx.h"
using namespace std;

int main()
{
	char a1,a2  ;
	long long a, b,c;
	int kaisu = 0;
	cin >> kaisu;
	for (int i = 0; i < kaisu; i++)
	{
		cin >> a;
		cin >> b;
		a1 =  GetDigit(a);
		a2 = GetDigit(a);
		if (a1 + a2 >= 80) { printf("overflow"); }
		else { c = a + b; printf(c + "\n"); }
	}
	return 0;
}
unsigned GetDigit(unsigned num) {
	return std::to_string(num).length();
}

Compiler output:
a.cc:7:9: fatal error: stdafx.h: No such file or directory
    7 | #include"stdafx.h"
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<algorithm>
#include<iostream>
#include<cstdio>
#include<stdio.h>
#include<string>
#include<string.h>
//#include"stdafx.h"
using namespace std;

int main()
{
	char a1,a2  ;
	long long a, b,c;
	int kaisu = 0;
	cin >> kaisu;
	for (int i = 0; i < kaisu; i++)
	{
		cin >> a;
		cin >> b;
		a1 =  GetDigit(a);
		a2 = GetDigit(a);
		if (a1 + a2 >= 80) { printf("overflow"); }
		else { c = a + b; printf(c + "\n"); }
	}
	return 0;
}
unsigned GetDigit(unsigned num) {
	return std::to_string(num).length();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: 'GetDigit' was not declared in this scope
   20 |                 a1 =  GetDigit(a);
      |                       ^~~~~~~~
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <string>
#define MAX_LEN 101

using namespace std;

void q15() {
	int N;
	scanf("%d\n", &N);
	for (int n = 0; n < N; n++) {
		string a, b;
		getline(cin, a);
		getline(cin, b);

		if (a.length() < b.length()) {
			string tmp = a;
			a = b;
			b = tmp;
		}

		reverse(a.begin(), a.end());
		reverse(b.begin(), b.end());
		
		int carry = 0;
		string ans="";

		int i = 0;
		for (; i < b.length(); i++) {
			ans+= (((a[i] - '0') + (b[i] - '0') + carry) % 10) + '0';
			carry = ((a[i] - '0') + (b[i] - '0') + carry) / 10;
		}
		for (; i < a.length(); i++) {
			ans+= (((a[i] - '0') + carry) % 10) + '0';
			carry = ((a[i] - '0') + carry) / 10;
		}
		for (; carry; i++) {
			ans+= (carry % 10) + '0';
			carry = carry / 10;
		}

		reverse(ans.begin(), ans.end());
		cout << (ans.length() > 80 ? "overflow" : ans) << endl;
	}
}
int main() {
	q15();
	return 0;
}

Compiler output:
a.cc: In function 'void q15()':
a.cc:23:17: error: 'reverse' was not declared in this scope
   23 |                 reverse(a.begin(), a.end());
      |                 ^~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

string plus(string,string);
void turn(string &);
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;++i){
		string str,sts;
		cin>>str>>sts;
		cout<<plus(str,sts)<<endl;
	}
	return 0;
}

string plus(string str,string sts){
	turn(str);
	turn(sts);
	while(str.size()!=sts.size()){
		if(str.size()<sts.size()){
			str+='0';
		}else{
			sts+='0';
		}
	}
	str+='0';
	sts+='0';
	for(int i=0;i<str.size()-1;++i){
		str[i]+=sts[i]-'0';
		while(str[i]>'9'){
			++str[i+1];
			str[i]-=10;
		}
	}
	if(str.back()=='0'){
		str.pop_back();
	}
	if(str.size()>80){
		return "overflow";
	}
	turn(str);
	return str;
}

void turn(string &str){
	for(int i=0;i<str.size()/2;++i){
		swap(str[i],str[str.size()-i-1]);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: reference to 'plus' is ambiguous
   14 |                 cout<<plus(str,sts)<<endl;
      |                       ^~~~
In file included from /usr/include/c++/14/string:49,
                 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,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_function.h:160:12: note: candidates are: 'template<class _Tp> struct std::plus'
  160 |     struct plus;
      |            ^~~~
a.cc:6:8: note:                 'std::string plus(std::string, std::string)'
    6 | string plus(string,string);
      |        ^~~~
Language: C++

#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
	int i;
	int num, pos;
	int len1, len2;
	char temp;
	char f1[101] = { 0 }, f2[101] = { 0 };
	int  up[100] = { 0 };
	int  sum[101] = { 0 };

	cin >> num;
	while (num--) {
		cin >> f1;
		cin >> f2;

		len1 = strlen(f1);
		len2 = strlen(f2);
		if (len1 > 80 || len2 > 80) {
			cout << "overflow" << endl;
			continue;
		}

		for (int i = 0; i < len1 / 2; i++) {
			temp = f1[i];
			f1[i] = f1[len1 - 1 - i];
			f1[len1 - 1 - i] = temp;
		}
		for (int i = 0; i < len2 / 2; i++) {
			temp = f2[i];
			f2[i] = f2[len2 - 1 - i];
			f2[len2 - 1 - i] = temp;
		}

		for (i = 0; i < len1; i++) f1[i] = f1[i] - 0x30;
		for (i = 0; i < len2; i++) f2[i] = f2[i] - 0x30;

		for (int i = 0; i < 100; i++) {
			sum[i] += (f1[i] + f2[i]);
			if (sum[i] >= 10) {
				sum[i] -= 10;
				sum[i + 1]++;
			}
		}

		for (pos = 100; sum[pos] == 0; pos--) {}
		if (pos >= 80) {
			cout << "overflow";
			break;
		}
		for (int i = pos; i >= 0; i--) {
			cout << sum[i];
		}
		cout << endl;
	}
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:20:24: error: 'strlen' was not declared in this scope
   20 |                 len1 = strlen(f1);
      |                        ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
	int i;
	int num, pos;
	int len1, len2;
	int sum[101] = { 0 };
	char temp;
	char f1[101] = { 0 }, f2[101] = { 0 };	

	cin >> num;
	while (num--) {
		cin >> f1;
		cin >> f2;

		len1 = strlen(f1);
		len2 = strlen(f2);
		if (len1 > 80 || len2 > 80) {
			cout << "overflow" << endl;
			continue;
		}

		for (int i = 0; i < len1 / 2; i++) {
			temp = f1[i];
			f1[i] = f1[len1 - 1 - i];
			f1[len1 - 1 - i] = temp;
		}
		for (int i = 0; i < len2 / 2; i++) {
			temp = f2[i];
			f2[i] = f2[len2 - 1 - i];
			f2[len2 - 1 - i] = temp;
		}

		for (i = 0; i < len1; i++) f1[i] = f1[i] - 0x30;
		for (i = 0; i < len2; i++) f2[i] = f2[i] - 0x30;

		for (int i = 0; i < 100; i++) {
			sum[i] += (f1[i] + f2[i]);
			if (sum[i] >= 10) {
				sum[i] -= 10;
				sum[i + 1]++;
			}
		}

		for (pos = 100; sum[pos] == 0; pos--) {}
		if (pos >= 80) {
			cout << "overflow" << endl;
			return 0;
		}
		for (int i = pos; i >= 0; i--) {
			cout << sum[i];
		}
		cout << endl;
	}
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:19:24: error: 'strlen' was not declared in this scope
   19 |                 len1 = strlen(f1);
      |                        ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include<iostream>
#include<cstdlib>
#include<string>

char iota(int n){
  switch (n) {
    case 0: return '0';
    case 1: return '1';
    case 2: return '2';
    case 3: return '3';
    case 4: return '4';
    case 5: return '5';
    case 6: return '6';
    case 7: return '7';
    case 8: return '8';
    case 9: return '9';
  }
  return '0';
}

int main(){
  std::string num1;
  std::string num2;
  char sum[102];
  int n,temp,flag=0,j;
  const char one = '1';

  std::cin >> n;

  for(int i=0;i<n;i++){
    std::cin >> num1 >> num2;

    if(num1.size()<num2.size()){
      num1.swap(num2);
    }
    std::reverse(num1.begin(),num1.end());
    std::reverse(num2.begin(),num2.end());

    for(j=0;j<num2.size();j++){
      //std::cout << 1;
      temp = (num1[j] - '0') + (num2[j] - '0');
      if(flag){
        temp +=1;
        flag = 0;
      }
      if(temp > 9){
        temp -= 10;
        flag = 1;
      }
      sum[j] = iota(temp);
      //std::cout << temp << std::endl;
    }
    while(j<num1.size()){
      temp = num1[j] = '0';
      if(flag){
        temp += 1;
        flag = 0;
      }
      if(temp > 9){
        temp -= 10;
        flag = 1;
      }
      sum[j] = iota(temp);
    }
    if(flag){
      sum[j] = (char)one;
      sum[j+1] = '\0';
    }else{
      sum[j] = '\0';
    }
    std::string ssum = std::string(sum);
    //std::reverse(num1.begin(),num1.end());
    //std::reverse(num2.begin(),num2.end());
    std::reverse(ssum.begin(),ssum.end());
    //std::cout << num1 << std::endl;
    //std::cout << num2 << std::endl;
    std::cout << ssum << std::endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:10: error: 'reverse' is not a member of 'std'
   36 |     std::reverse(num1.begin(),num1.end());
      |          ^~~~~~~
a.cc:37:10: error: 'reverse' is not a member of 'std'
   37 |     std::reverse(num2.begin(),num2.end());
      |          ^~~~~~~
a.cc:74:10: error: 'reverse' is not a member of 'std'
   74 |     std::reverse(ssum.begin(),ssum.end());
      |          ^~~~~~~
Language: C++

#include<iostream>
#include<string>

char iota(int n){
  switch (n) {
    case 0: return '0';
    case 1: return '1';
    case 2: return '2';
    case 3: return '3';
    case 4: return '4';
    case 5: return '5';
    case 6: return '6';
    case 7: return '7';
    case 8: return '8';
    case 9: return '9';
  }
  return '0';
}

int main(){
  std::string num1;
  std::string num2;
  char sum[102];
  int n,temp,flag=0,j;
  const char one = '1';

  std::cin >> n;

  for(int i=0;i<n;i++){
    std::cin >> num1 >> num2;

    if(num1.size()<num2.size()){
      num1.swap(num2);
    }
    std::reverse(num1.begin(),num1.end());
    std::reverse(num2.begin(),num2.end());

    for(j=0;j<num2.size();j++){
      //std::cout << 1;
      temp = (num1[j] - '0') + (num2[j] - '0');
      if(flag){
        temp +=1;
        flag = 0;
      }
      if(temp > 9){
        temp -= 10;
        flag = 1;
      }
      sum[j] = iota(temp);
      //std::cout << temp << std::endl;
    }
    while(j<num1.size()){
      temp = num1[j] = '0';
      if(flag){
        temp += 1;
        flag = 0;
      }
      if(temp > 9){
        temp -= 10;
        flag = 1;
      }
      sum[j] = iota(temp);
    }
    if(flag){
      sum[j] = (char)one;
      sum[j+1] = '\0';
    }else{
      sum[j] = '\0';
    }
    std::string ssum = std::string(sum);
    //std::reverse(num1.begin(),num1.end());
    //std::reverse(num2.begin(),num2.end());
    std::reverse(ssum.begin(),ssum.end());
    //std::cout << num1 << std::endl;
    //std::cout << num2 << std::endl;
    std::cout << ssum << std::endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:10: error: 'reverse' is not a member of 'std'
   35 |     std::reverse(num1.begin(),num1.end());
      |          ^~~~~~~
a.cc:36:10: error: 'reverse' is not a member of 'std'
   36 |     std::reverse(num2.begin(),num2.end());
      |          ^~~~~~~
a.cc:73:10: error: 'reverse' is not a member of 'std'
   73 |     std::reverse(ssum.begin(),ssum.end());
      |          ^~~~~~~
Language: C++

#include<iostream>
#include<string>

char iota(int n){
  switch (n) {
    case 0: return '0';
    case 1: return '1';
    case 2: return '2';
    case 3: return '3';
    case 4: return '4';
    case 5: return '5';
    case 6: return '6';
    case 7: return '7';
    case 8: return '8';
    case 9: return '9';
  }
  return '0';
}

int main(){
  std::string num1;
  std::string num2;
  char sum[102];
  int n,temp,flag=0,j;
  const char one = '1';

  std::cin >> n;

  for(int i=0;i<n;i++){
    std::cin >> num1 >> num2;

    if(num1.size()<num2.size()){
      num1.swap(num2);
    }
    std::reverse(num1.begin(),num1.end());
    std::reverse(num2.begin(),num2.end());

    for(j=0;j<num2.size();j++){
      //std::cout << 1;
      temp = (num1[j] - '0') + (num2[j] - '0');
      if(flag){
        temp +=1;
        flag = 0;
      }
      if(temp > 9){
        temp -= 10;
        flag = 1;
      }
      sum[j] = iota(temp);
      //std::cout << temp << std::endl;
    }
    while(j<num1.size()){
      temp = num1[j] = '0';
      if(flag){
        temp += 1;
        flag = 0;
      }
      if(temp > 9){
        temp -= 10;
        flag = 1;
      }
      sum[j] = iota(temp);
    }
    if(flag){
      sum[j] = (char)one;
      sum[j+1] = '\0';
    }else{
      sum[j] = '\0';
    }
    std::string ssum = std::string(sum);
    //reverse(num1.begin(),num1.end());
    //reverse(num2.begin(),num2.end());
    reverse(ssum.begin(),ssum.end());
    //std::cout << num1 << std::endl;
    //std::cout << num2 << std::endl;
    std::cout << ssum << std::endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:10: error: 'reverse' is not a member of 'std'
   35 |     std::reverse(num1.begin(),num1.end());
      |          ^~~~~~~
a.cc:36:10: error: 'reverse' is not a member of 'std'
   36 |     std::reverse(num2.begin(),num2.end());
      |          ^~~~~~~
a.cc:73:5: error: 'reverse' was not declared in this scope
   73 |     reverse(ssum.begin(),ssum.end());
      |     ^~~~~~~
Language: C++

#include<iostream>
#include<string>

int main(){
  std::string as;
  std::string bs;
  int a[102]={0};
  int b[102]={0};
  int sum[102]={0};
  int a_size,b_size,sum_size,n,i,j,flag=0;
  char num;

  std::cin >> n;

  for(i=0;i<n;i++){
    std::cin >> as >> bs;
    a_size = as.size();
    b_size = bs.size();

    for(j=0;j<102;j++){   //??????????????????(100??????00100)
      if(101-j<=a_size){
        a[101-j] = as[j-a_size] - '0';
      }else{
        a[101-j] = 0;
      }
      if(101-j<=b_size){
        b[101-j] = bs[j-a_size] - '0';
      }else{
        b[101-j] = 0;
      }
    }

    for(j=0;j<102;j++){       //sum????¨????
      sum[j] = a[j] + b[j];
      if(flag){               //??°?????????
        sum[j] += 1;
        flag = 0;
      }
      if(j>=80&&sum[j]!=0){   //???????????????????????????
        overflow = 1;
        break;
      }
      if(sum[j] > 9){         //??°???????????????
        sum[j] -= 10;
        flag = 1;
      }
    }
    if(overflow){             //??????
      std::cout << "overflow" << std::endl;
      overflow = 0;
      continue;
    }
    for(j=0;j<102;j++){
      if(sum[101-j]!=0){
        sum_size = 101-j;
        break;
      }
    }
    for(j=sum_size;j>=0;j--){
      num = sum[j] + '0';
      std::cout << num;
    }
    std::cout << std::endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:9: error: 'overflow' was not declared in this scope
   40 |         overflow = 1;
      |         ^~~~~~~~
a.cc:48:8: error: 'overflow' was not declared in this scope
   48 |     if(overflow){             //??????
      |        ^~~~~~~~
Language: C++

#include<iostream>
#include<string>

char iota(int n){
  switch (n) {
    case 0: return '0';
    case 1: return '1';
    case 2: return '2';
    case 3: return '3';
    case 4: return '4';
    case 5: return '5';
    case 6: return '6';
    case 7: return '7';
    case 8: return '8';
    case 9: return '9';
  }
  return '0';
}

int main(){

  std::string num1;   //("10000");
  std::string num2:   //("990000");
  char sum[100]={};
  int n,i,j,flag=0,temp;

  std::cin >> n;
  //n=1;
  for(i=0;i<100;i++){
    sum[i]='\0';
  }

  for(i=0;i<n;i++){
    std::cin >> num1 >> num2;
    if(num1.size()<num2.size()){
      num1.swap(num2);
    }
    //std::cout << num1 << std::endl;
    //std::cout << num2 << std::endl;
    for(j=0;j<num1.size();j++){
      if(j<num2.size()){
        temp = (num1[num1.size()-j-1]-'0')+(num2[num2.size()-j-1]-'0');
      }
      if(j>=num2.size()){
        temp = num1[num1.size()-j-1]-'0';
      }
      if(flag){
      ++temp;
      flag = 0;
      }
      if(temp>9){
        temp -= 10;
        flag = 1;
      }
      sum[j] = iota(temp);
    }
    if(flag){
      sum[j] = '1';
      flag = 0;
    }
    //printf("%s\n",sum);
    j=0;
    while(sum[j]!='\0'){
      ++j;
    }
    if(j>80){
      std::cout << "overflow" << std::endl;
    }else{
      while(j>0){
        std::cout << sum[j-1];
        --j;
      }
      std::cout << std::endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: expected initializer before ':' token
   23 |   std::string num2:   //("990000");
      |                   ^
a.cc:30:5: error: 'sum' was not declared in this scope
   30 |     sum[i]='\0';
      |     ^~~
a.cc:34:25: error: 'num2' was not declared in this scope; did you mean 'num1'?
   34 |     std::cin >> num1 >> num2;
      |                         ^~~~
      |                         num1
a.cc:55:7: error: 'sum' was not declared in this scope
   55 |       sum[j] = iota(temp);
      |       ^~~
a.cc:58:7: error: 'sum' was not declared in this scope
   58 |       sum[j] = '1';
      |       ^~~
a.cc:63:11: error: 'sum' was not declared in this scope
   63 |     while(sum[j]!='\0'){
      |           ^~~
a.cc:70:22: error: 'sum' was not declared in this scope
   70 |         std::cout << sum[j-1];
      |                      ^~~