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

using System;
using System.Linq;
 
public class Program
{
    private static void Main(string[] args)
    {
        string line;
        while (!string.IsNullOrEmpty(line = Console.ReadLine()))
        {
            Console.WriteLine(line.Split().Select(int.Parse).Sum().ToString().Length);
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Program
      | ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int a, b;

	while (cin >> a >> b)
	{
		cout << (int)log10(a + b) + 1 << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: 'log10' was not declared in this scope
   10 |                 cout << (int)log10(a + b) + 1 << endl;
      |                              ^~~~~
Language: C++

#include <iostream>
#include <>

int main(){
  int a, b, c;
  int i = 1;
  int num = 0;
  
  std::cin >> a;
  std::cin >> b;
  
  c = a + b;
  while(1){
    if(c/i!=0){
      num++;
    }else{
      break;
    }
  }
  std::cout << num << std::endl;
  
  return 0;
}

Compiler output:
a.cc:2:10: error: empty filename in #include
    2 | #include <>
      |          ^~
Language: C++

import Data.List.Split
import Control.Applicative

readInt = (read :: String -> Integer)

main = do
    s <- (splitOn "\n") <$> getContents
    let nums = [map readInt $ splitOn " " t | t <- s]
    putStr $ unlines [show $ x + y | [x,y] <- nums]

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import Data.List.Split
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>
using namespace std;

int main(void){
    int a, b, sum, cnt;
    for(cin >> a >> b){
        cnt = 0;
        sum = a+b;
        while(sum){
            sum/=10;
            cnt++;
        }
        cout << cnt <<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: expected ';' before ')' token
    6 |     for(cin >> a >> b){
      |                      ^
      |                      ;
a.cc:15:5: error: expected primary-expression before 'return'
   15 |     return 0;
      |     ^~~~~~
a.cc:14:6: error: expected ';' before 'return'
   14 |     }
      |      ^
      |      ;
   15 |     return 0;
      |     ~~~~~~
a.cc:15:5: error: expected primary-expression before 'return'
   15 |     return 0;
      |     ^~~~~~
a.cc:14:6: error: expected ')' before 'return'
   14 |     }
      |      ^
      |      )
   15 |     return 0;
      |     ~~~~~~
a.cc:6:8: note: to match this '('
    6 |     for(cin >> a >> b){
      |        ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  for(int i=0;i<200;i++){
    int a,b,i=0;
    cin>>a>>b;
    int num=1;
    int c=a+b;
    while(c/10!=0){
      num++;
      c/=10;
    }
    cout<<num<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: redeclaration of 'int i'
    5 |     int a,b,i=0;
      |             ^
a.cc:4:11: note: 'int i' previously declared here
    4 |   for(int i=0;i<200;i++){
      |           ^
Language: C++

#include<stdio.h>
int main(void)
{
	int a, b, c;
	scamf("%d %d", &a, &b);
	c = a+b;
	printf("%d\n", c/10);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'scamf' was not declared in this scope; did you mean 'scanf'?
    5 |         scamf("%d %d", &a, &b);
      |         ^~~~~
      |         scanf
Language: C++

#include<stdio.h>
int main(void)
{
	int a[100], b[100], c, i;
	for(i=0;(a[i]!='\n')||(b[i]!='\n');i++)
	{
		scanf("%d %d", &a[i], &b[i]);
		c = a[i]+b[i];
		printf("%d\n", log(c));
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:32: error: 'log' was not declared in this scope; did you mean 'long'?
    9 |                 printf("%d\n", log(c));
      |                                ^~~
      |                                long
Language: C++

#include <iostream>

using namespace std;
int main()
{
	int a,b;
	while (1){
		cin >> a;
		if (a == EOF) return;
		cin >> b;
		if (b == EOF) return;
		cout << a + b << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:31: error: return-statement with no value, in function returning 'int' [-fpermissive]
    9 |                 if (a == EOF) return;
      |                               ^~~~~~
a.cc:11:31: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 |                 if (b == EOF) return;
      |                               ^~~~~~
Language: C++

using System;

class main(){
public static void Main(String[] a){
string[] s=new string[200];
for(int i;i<200;i++){
s[i]=Console.ReadLine();
}

string[] s1=new string[2];
long a,b.d,dk;

foreach(sa in s){
if(IsNullOrEmpty(sa))continue;
s1=sa.Split(' ');

a=long.Parse(s1[0]);
b=long.Parse(s1[1]);
d=a+b;
dk=(string)d.Length;
Console.WriteLine(dk);
}

}}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:3:12: error: expected unqualified-id before ')' token
    3 | class main(){
      |            ^
Language: C++

#include<iostream>
using namespace std;
 
int main() {
 
    int a, b;
 
    while (cin >> a >> b) {
        int n = 1;
        for(int i = 0; ; i++) {
            if (a + b < n)  {
                cout << i << endl;
                break;
            }
            n = n * 10;
        }
    }
      
    return 0;
 

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: expected '}' at end of input
   19 |     return 0;
      |              ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  for(int a,b,c,ans=1;cin >> a;cin >> b;){
  c=a+b;
  if(c>=10){
    ans++;
  }
  if(c>=100){
    ans++;
  }
  if(c>=1000){
    ans++;
  }
  if(c>=10000){
    ans++;
  }
  if(c>=100000){
    ans++;
  }
  if(c>=1000000){
    ans++;
  }
  cout << ans;
}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:40: error: expected ')' before ';' token
    5 |   for(int a,b,c,ans=1;cin >> a;cin >> b;){
      |      ~                                 ^
      |                                        )
a.cc:5:41: error: expected primary-expression before ')' token
    5 |   for(int a,b,c,ans=1;cin >> a;cin >> b;){
      |                                         ^
Language: C++

#include<iostream>
#include<cmath>
using namespace std;

int main(){
string s;
int a,b,c;
while (getline(cin, s ))
{
std::istringstream iss1(s.substr(0,SpaceInd));
iss1 >> a;

std::istringstream iss2(s.substr(SpaceInd+1));
iss2 >> b;
cout<<(int)log10(a+b)<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: variable 'std::istringstream iss1' has initializer but incomplete type
   10 | std::istringstream iss1(s.substr(0,SpaceInd));
      |                         ^
a.cc:10:36: error: 'SpaceInd' was not declared in this scope
   10 | std::istringstream iss1(s.substr(0,SpaceInd));
      |                                    ^~~~~~~~
a.cc:13:25: error: variable 'std::istringstream iss2' has initializer but incomplete type
   13 | std::istringstream iss2(s.substr(SpaceInd+1));
      |                         ^
Language: C++

#include<bits/c++.h>

using namespace std;
 
int main(){
string s;
int a,b,c;
while (getline(cin, s ))
{
std::istringstream iss1(s.substr(0,SpaceInd));
iss1 >> a;
 
std::istringstream iss2(s.substr(SpaceInd+1));
iss2 >> b;
cout<<(int)log10(a+b)<<endl;
}
return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits/c++.h: No such file or directory
    1 | #include<bits/c++.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<sstream>
#include<cmath>
using namespace std;
 
int main(){
string s;
int a,b,c;
while (getline(cin, s ))
{
std::istringstream iss1(s.substr(0,SpaceInd));
iss1 >> a;
 
std::istringstream iss2(s.substr(SpaceInd+1));
iss2 >> b;
cout<<(int)log10(a+b)<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:36: error: 'SpaceInd' was not declared in this scope
   11 | std::istringstream iss1(s.substr(0,SpaceInd));
      |                                    ^~~~~~~~
Language: C++

HAhahahah
xwhdxjwhxkedx
ed
edc
de
ce
cde
cejdlcekdjlekjcded
cedjedejdklkexjelkxjlkexdjlx

Compiler output:
a.cc:1:1: error: 'HAhahahah' does not name a type
    1 | HAhahahah
      | ^~~~~~~~~
Language: C++

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

int main(){
    int a,b;
    int k=1;
    while(cin>>a>>b){
            while(a+b>=pow(10,k)){
                k++;
            }
        }
        cout<<k<<endl;
    }
    return(0);
}

Compiler output:
a.cc:14:5: error: expected unqualified-id before 'return'
   14 |     return(0);
      |     ^~~~~~
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

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

int main(){
    int a,b;
    int k=1;
    int m=10;
    while(cin>>a>>b){
            while(a+b>=m/*pow(10,k)*/){
                k++;
                m*=10;
            }
        }
        cout<<k<<endl;
    }
    return(0);
}

Compiler output:
a.cc:16:5: error: expected unqualified-id before 'return'
   16 |     return(0);
      |     ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include<cstdio>
#include<iostream>
#include<cstring> // ??????????????????????±???????????????????
using namespace std;

int main(){
	int a,b,s=0,l;
	char str[100];
	cin >> a >> b;

	s=a+b;
	itoa(s,str,10); // s???10?????°??§??????????????????
	l = strlen(str); // ???????????????????????????
	cout << l;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'itoa' was not declared in this scope
   12 |         itoa(s,str,10); // s???10?????°??§??????????????????
      |         ^~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<cstring> // ??????????????????????±???????????????????
using namespace std;

int main(){
	int a,b,s=0,l;
	char str[100];
	cin >> a >> b;

	s=a+b;
	itoa(s,str,10); // s???10?????°??§??????????????????
	l = strlen(str); // ???????????????????????????
	cout << l << "\n";

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'itoa' was not declared in this scope
   12 |         itoa(s,str,10); // s???10?????°??§??????????????????
      |         ^~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<cstring> // ??????????????????????±???????????????????
using namespace std;

int main(){
	
	while(1){
	int a,b,s=0,l;
	char str[100];
	cin >> a >> b;

	s=a+b;
	itoa(s,str,10); // s???10?????°??§??????????????????
	l = strlen(str); // ???????????????????????????
	cout << l << "\n";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'itoa' was not declared in this scope
   14 |         itoa(s,str,10); // s???10?????°??§??????????????????
      |         ^~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<cstring> // ??????????????????????±???????????????????
using namespace std;

int main(){
	int n;
	while( scanf("%d",&n) != EOF ){
		int a,b,s=0,l;
		char str[100];
		cin >> a >> b;

		s=a+b;
		itoa(s,str,10); // s???10?????°??§??????????????????
		l = strlen(str); // ???????????????????????????
		cout << l << "\n";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'itoa' was not declared in this scope
   14 |                 itoa(s,str,10); // s???10?????°??§??????????????????
      |                 ^~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<cstring> // ??????????????????????±???????????????????
using namespace std;

int main(){
	int a,b,s=0,l;
	while( cin >> a >> b  ){
		char str[100];
		s=a+b;
		itoa(s,str,10); // s???10?????°??§??????????????????
		l = strlen(str); // ???????????????????????????
		cout << l << "\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'itoa' was not declared in this scope
   11 |                 itoa(s,str,10); // s???10?????°??§??????????????????
      |                 ^~~~
Language: C++

#include<cstdio>
#include <cstdlib>
#include<iostream>
#include<cstring> // ??????????????????????±???????????????????
using namespace std;

int main(){
	int a,b,s=0,l;
	while( cin >> a >> b  ){
		char str[100];
		s=a+b;
		itoa(s,str,10); // s???10?????°??§??????????????????
		l = strlen(str); // ???????????????????????????
		cout << l << "\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'itoa' was not declared in this scope
   12 |                 itoa(s,str,10); // s???10?????°??§??????????????????
      |                 ^~~~
Language: C++

#include<cstdio>
#include <stdlib.h>
#include<iostream>
#include<cstring> // ??????????????????????±???????????????????
using namespace std;

int main(){
	int a,b,s=0,l;
	while( cin >> a >> b  ){
		char str[100];
		s=a+b;
		itoa(s,str,10); // s???10?????°??§??????????????????
		l = strlen(str); // ???????????????????????????
		cout << l << "\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'itoa' was not declared in this scope
   12 |                 itoa(s,str,10); // s???10?????°??§??????????????????
      |                 ^~~~
Language: C++

#include<stdio.h>
#include <stdlib.h>
#include<iostream>
#include<cstring> // ??????????????????????±???????????????????
using namespace std;

int main(){
	int a,b,s=0,l;
	while( cin >> a >> b  ){
		char str[100];
		s=a+b;
		itoa(s,str,10); // s???10?????°??§??????????????????
		l = strlen(str); // ???????????????????????????
		cout << l << "\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'itoa' was not declared in this scope
   12 |                 itoa(s,str,10); // s???10?????°??§??????????????????
      |                 ^~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
#include<iostream>
#include<cstring> // ??????????????????????±???????????????????
using namespace std;

int main(){
	int a,b,s=0,l;
	while( cin >> a >> b  ){
		char str[100];
		s=a+b;
		itoa(s,str,10); // s???10?????°??§??????????????????
		l = strlen(str); // ???????????????????????????
		cout << l << "\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'itoa' was not declared in this scope
   13 |                 itoa(s,str,10); // s???10?????°??§??????????????????
      |                 ^~~~
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
#include<math.h>
using namespace std;

#define MAX 256

int f(int z){
	int z;
	if (z < 10)return 1;
	return 1 + f(z / 10);
}

int main(void){
	
	int ans[200];
	for (long i = 0; i < 200; i++){
		ans[i] = 0;
	}

	long a, b;
	long i = 0;

	while (scanf("%ld%ld", &a, &b) != EOF){
		ans[i] = f(a, b);
		i++;
	}

	for (int j = 0; j < i; j++){
		printf("%d\n", ans[j]);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int f(int)':
a.cc:10:13: error: declaration of 'int z' shadows a parameter
   10 |         int z;
      |             ^
a.cc:9:11: note: 'int z' previously declared here
    9 | int f(int z){
      |       ~~~~^
a.cc: In function 'int main()':
a.cc:26:27: error: too many arguments to function 'int f(int)'
   26 |                 ans[i] = f(a, b);
      |                          ~^~~~~~
a.cc:9:5: note: declared here
    9 | int f(int z){
      |     ^
Language: C++

import sys

for line in sys.stdin:
	a,b=map(int,line.split())
	print(len(str(a+b)))

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<string>
#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b;
	cin >> a>>b;
 string x=IntToString(a+B);
cout<<x.size()<<endl;
return 0;
}
string IntToString(int number)
{
  string stream ss;
  ss << number;
  return ss.str();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: 'B' was not declared in this scope
   10 |  string x=IntToString(a+B);
      |                         ^
a.cc:10:11: error: 'IntToString' was not declared in this scope
   10 |  string x=IntToString(a+B);
      |           ^~~~~~~~~~~
a.cc: In function 'std::string IntToString(int)':
a.cc:16:17: error: expected initializer before 'ss'
   16 |   string stream ss;
      |                 ^~
a.cc:17:3: error: 'ss' was not declared in this scope
   17 |   ss << number;
      |   ^~
Language: C++

#include<string>
#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b;
	cin >> a>>b;
 string x=IntToString(a+b);
cout<<x.size()<<endl;
return 0;
}
string IntToString(int number)
{
  string stream ss;
  ss << number;
  return ss.str();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'IntToString' was not declared in this scope
   10 |  string x=IntToString(a+b);
      |           ^~~~~~~~~~~
a.cc: In function 'std::string IntToString(int)':
a.cc:16:17: error: expected initializer before 'ss'
   16 |   string stream ss;
      |                 ^~
a.cc:17:3: error: 'ss' was not declared in this scope
   17 |   ss << number;
      |   ^~
Language: C++

#include<string>
#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b;
	cin >> a>>b;
string stream ss;
  ss << number;
   string x=ss.str()
cout<<x.size()<<endl;
return 0;
}
string IntToString(int number)
{
  string stream ss;
  ss << number;
  return ss.str();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected initializer before 'ss'
   10 | string stream ss;
      |               ^~
a.cc:11:3: error: 'ss' was not declared in this scope
   11 |   ss << number;
      |   ^~
a.cc:11:9: error: 'number' was not declared in this scope
   11 |   ss << number;
      |         ^~~~~~
a.cc: In function 'std::string IntToString(int)':
a.cc:18:17: error: expected initializer before 'ss'
   18 |   string stream ss;
      |                 ^~
a.cc:19:3: error: 'ss' was not declared in this scope
   19 |   ss << number;
      |   ^~
Language: C++

#include<string>
#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b;
	cin >> a>>b;
string stream ss;
  ss << number;
   string x=ss.str();
cout<<x.size()<<endl;
return 0;
}
string IntToString(int number)
{
  string stream ss;
  ss << number;
  return ss.str();
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected initializer before 'ss'
   10 | string stream ss;
      |               ^~
a.cc:11:3: error: 'ss' was not declared in this scope
   11 |   ss << number;
      |   ^~
a.cc:11:9: error: 'number' was not declared in this scope
   11 |   ss << number;
      |         ^~~~~~
a.cc: In function 'std::string IntToString(int)':
a.cc:18:17: error: expected initializer before 'ss'
   18 |   string stream ss;
      |                 ^~
a.cc:19:3: error: 'ss' was not declared in this scope
   19 |   ss << number;
      |   ^~
Language: C++

#include<string>
#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b;
	cin >> a>>b;
string stream ss;
  ss << number;
   string x=ss.str();
cout<<x.size()<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected initializer before 'ss'
   10 | string stream ss;
      |               ^~
a.cc:11:3: error: 'ss' was not declared in this scope
   11 |   ss << number;
      |   ^~
a.cc:11:9: error: 'number' was not declared in this scope
   11 |   ss << number;
      |         ^~~~~~
Language: C++

#include<string>
#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b;
	cin >> a>>b;
string stream ss;
  ss << a+b;
   string x=ss.str();
cout<<x.size()<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected initializer before 'ss'
   10 | string stream ss;
      |               ^~
a.cc:11:3: error: 'ss' was not declared in this scope
   11 |   ss << a+b;
      |   ^~
Language: C++

#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }
using namespace std;
int main()
{
	int a, b;
	while (cin>>a>>b)
	{
		cout << to_string(a+b).length() << endl;
	}
	return 0;

}

Compiler output:
a.cc:11:26: error: 'string' does not name a type; did you mean 'stdin'?
   11 | template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }
      |                          ^~~~~~
      |                          stdin
a.cc: In function 'int main()':
a.cc:16:16: error: 'cin' was not declared in this scope
   16 |         while (cin>>a>>b)
      |                ^~~
a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    7 | #include <stack>
  +++ |+#include <iostream>
    8 | #include <string>
a.cc:18:17: error: 'cout' was not declared in this scope
   18 |                 cout << to_string(a+b).length() << endl;
      |                 ^~~~
a.cc:18:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostraem>
using namespace std;

int main()
{  
  int buff,buff2,result;
  cin >> buff >> buff2;
  
  while(buff != 0)
  {
    buff += buff2;
    buff /= 10;
    result++;
  }

  cout << result << endl;
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: iostraem: No such file or directory
    1 | #include <iostraem>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;

int main()
{
  int tmp,tmp2;
  cin >> tmp >> tmp2;
  tmp += tmp2;
  
  to_string(tmp);
  cout << tmp.length << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: warning: ignoring return value of 'std::string std::__cxx11::to_string(int)', declared with attribute 'nodiscard' [-Wunused-result]
   10 |   to_string(tmp);
      |   ~~~~~~~~~^~~~~
In file included 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,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4240:3: note: declared here
 4240 |   to_string(int __val)
      |   ^~~~~~~~~
a.cc:11:15: error: request for member 'length' in 'tmp', which is of non-class type 'int'
   11 |   cout << tmp.length << endl;
      |               ^~~~~~
Language: C++

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

int main(){
  int tmp,tmp2;
  cin >> tmp >> tmp2;
  tmp += tmp2;
  
  cout << to_string(tmp).length << endl;
  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: invalid use of non-static member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
   10 |   cout << to_string(tmp).length << endl;
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included 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,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1083:7: note: declared here
 1083 |       length() const _GLIBCXX_NOEXCEPT
      |       ^~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int a,b = 1;
    int ans,line = 0;
    
    while(std::cin >>a>>b;){
        ans = a + b;
        ans /= 10;
        if(ans  <= 9){
            ans = 2;
        }
        else if(ans <= 99){
            ans = 3;
        }
        else if(ans <= 999){
            ans = 4;
        }
        std::cout << ans << std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected ')' before ';' token
    7 |     while(std::cin >>a>>b;){
      |          ~               ^
      |                          )
a.cc:7:27: error: expected primary-expression before ')' token
    7 |     while(std::cin >>a>>b;){
      |                           ^
Language: C++

#include<stdio.h>
#include<math.h>
int main(){
int a,b,c,d;
while(scanf("%d %d", &a, &b) != EOF){
 c=(int)log10(a+b)+1;
 printf("%d\n",c);
 }
return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected '}' at end of input
    9 | return 0;
      |          ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>

using namespace std;

int main() {
    int a, b;
    while (cin >> a >> b) {
        cout << static_cast<int>(log10(a + b) + 1) << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: 'log10' was not declared in this scope
    8 |         cout << static_cast<int>(log10(a + b) + 1) << endl;
      |                                  ^~~~~
Language: C++

#include<stdio.h>
int main()
{
  int a,b,c=1,d=1;
  while(scanf("%d%d",&a,&b) != EOF
{
  while(c<=a+b)
    {
      c*=10;
      d++;
    }
  printf("%d\n",d);
}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: expected ')' before '{' token
    6 | {
      | ^
a.cc:5:8: note: to match this '('
    5 |   while(scanf("%d%d",&a,&b) != EOF
      |        ^
Language: C++

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

int a;
int b;

int main() {
  while (cin >> a >> b ; != EOF) {
    int i;
    a = a + b;
    while(a > 0) {
      a = a / 10;
      ++i;
    }
    
    cout << i << endl;
    
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ')' before ';' token
    8 |   while (cin >> a >> b ; != EOF) {
      |         ~             ^~
      |                       )
a.cc:8:26: error: expected primary-expression before '!=' token
    8 |   while (cin >> a >> b ; != EOF) {
      |                          ^~
Language: C++

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

int a;
int b;

int main() {
  while (cin >> a >> b , != EOF) {
    int i;
    a = a + b;
    while(a > 0) {
      a = a / 10;
      ++i;
    }
    
    cout << i << endl;
    
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: expected primary-expression before '!=' token
    8 |   while (cin >> a >> b , != EOF) {
      |                          ^~
Language: C++

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

int a;
int b;

int main() {
  while (cin >> a >> b , != EOF) {
    int i;
    a = a + b;
    while(a > 0) {
      a = a / 10;
      ++i;
    }
    
    cout << i << endl;
    
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: expected primary-expression before '!=' token
    9 |   while (cin >> a >> b , != EOF) {
      |                          ^~
Language: C++

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

int a;
int b;

int main() {
  while (c != EOF) {
    c = dainyuu()
    int i;
    a = a + b;
    while(a > 0) {
      a = a / 10;
      ++i;
    }
    
    cout << i << endl;
    
  }
}

int dainyuu() {
  cin >> a >> b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'c' was not declared in this scope
    9 |   while (c != EOF) {
      |          ^
a.cc:10:9: error: 'dainyuu' was not declared in this scope
   10 |     c = dainyuu()
      |         ^~~~~~~
a.cc:15:9: error: 'i' was not declared in this scope
   15 |       ++i;
      |         ^
a.cc:18:13: error: 'i' was not declared in this scope
   18 |     cout << i << endl;
      |             ^
a.cc: In function 'int dainyuu()':
a.cc:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
   25 | }
      | ^
Language: C++

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

int a;
int b;

int main() {
  while (c != EOF) {
    c = dainyuu();
    int i;
    a = a + b;
    while(a > 0) {
      a = a / 10;
      ++i;
    }
    
    cout << i << endl;
    
  }
}

int dainyuu() {
  cin >> a >> b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'c' was not declared in this scope
    9 |   while (c != EOF) {
      |          ^
a.cc:10:9: error: 'dainyuu' was not declared in this scope
   10 |     c = dainyuu();
      |         ^~~~~~~
a.cc: In function 'int dainyuu()':
a.cc:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
   25 | }
      | ^
Language: C++

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

int a;
int b;
c = dainyuu()

int main() {
  while (c != EOF) {
    dainyuu();
    int i;
    a = a + b;
    while(a > 0) {
      a = a / 10;
      ++i;
    }
    
    cout << i << endl;
    
  }
}

int dainyuu() {
  cin >> a >> b;
}

Compiler output:
a.cc:7:1: error: 'c' does not name a type
    7 | c = dainyuu()
      | ^
a.cc: In function 'int dainyuu()':
a.cc:26:1: warning: no return statement in function returning non-void [-Wreturn-type]
   26 | }
      | ^
Language: C++

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

int a,b,c;
c = dainyuu()

int main() {
  while (c != EOF) {
    dainyuu();
    int i;
    a = a + b;
    while(a > 0) {
      a = a / 10;
      ++i;
    }
    
    cout << i << endl;
    
  }
}

int dainyuu() {
  cin >> a >> b;
}

Compiler output:
a.cc:6:1: error: 'c' does not name a type
    6 | c = dainyuu()
      | ^
a.cc: In function 'int dainyuu()':
a.cc:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
   25 | }
      | ^
Language: C++

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

int a,b,c;
c = dainyuu();

int main() {
  while (c != EOF) {
    int i;
    a = a + b;
    while(a > 0) {
      a = a / 10;
      ++i;
    }
    
    cout << i << endl;
    
  }
}

int dainyuu() {
  cin >> a >> b;
}

Compiler output:
a.cc:6:1: error: 'c' does not name a type
    6 | c = dainyuu();
      | ^
a.cc: In function 'int dainyuu()':
a.cc:24:1: warning: no return statement in function returning non-void [-Wreturn-type]
   24 | }
      | ^
Language: C++

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

int a,b;

int main() {
  while (dainyuu() != EOF) {
    int i;
    a = a + b;
    while(a > 0) {
      a = a / 10;
      ++i;
    }
    
    cout << i << endl;
    
  }
}

void dainyuu() {
  cin >> a >> b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'dainyuu' was not declared in this scope
    8 |   while (dainyuu() != EOF) {
      |          ^~~~~~~
Language: C++

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

int a,b;

int main() {
  while (dainyuu() != EOF) {
    int i;
    a = a + b;
    while(a > 0) {
      a = a / 10;
      ++i;
    }
    
    cout << i << endl;
    
  }
}

int dainyuu() {
  cin >> a >> b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'dainyuu' was not declared in this scope
    8 |   while (dainyuu() != EOF) {
      |          ^~~~~~~
a.cc: In function 'int dainyuu()':
a.cc:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
   23 | }
      | ^
Language: C++

#include <cstdio>
??????
#define MAX 1000000
#define MIN 0
#define SIZE 200
??????
int main() {
??int i,j;
??int a,b;
??int cnt = 0;
??int buf = 0;
??int sets[SIZE];
??????
??while(scanf("%d %d",&a,&b) != EOF) {
????if((a < MIN) || (b > MAX)) {
??????continue;
????}
????????
????sets[cnt] = a + b;
????++cnt;
??}
????
??for(i = 0;i <= cnt;++i) {
????j = MAX;
??
????while(j != 0) {
??????if((sets[i] / j) != 0) {
????????++buf;
????????sets[i] -= (sets[i] / j) * j;
??????}
??????
??????j /= 10;
????}
????
  sets[i] = buf;
????buf = 0;
??}
????
??for(i = 0;i <= cnt;++i) {
????printf("%d\n",sets[i]);
??}
????
??return 0;
}

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

#include<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
using namespace std;
 /*temp*/

int main(){
    int i, j;
    while(cin >> i >> j){
        int n = 0;
        i += j;
        while(i > 0){
            i /= 10;
            ++n;
        }
    }
    cout << n << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'n' was not declared in this scope
   19 |     cout << n << '\n';
      |             ^
Language: C++

#include<stdio.h>
#include<iostream>
using namespace std;
int main(){
	int a = 0, b = 0;
	int v;
	int i = 0;
	while (scanf_s("%d %d",&a,&b)!= EOF){
		int c = a + b;
		if (a + b < 10){
			cout << "1" << endl;
		}
		else if (a + b < 100){
			cout << "2" << endl;
		}
		else if (a + b < 1000){
			cout << "3" << endl;
		}
		else if (a + b < 10000){
			cout << "4" << endl;
		}
		else if (a + b < 100000){
			cout << "5" << endl;
		}
		else if (a + b < 1000000){
			cout << "6" << endl;
		}
		else{
			cout << "7" << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         while (scanf_s("%d %d",&a,&b)!= EOF){
      |                ^~~~~~~
      |                scanf
Language: C++

#include<iostream>

using namespace std;
int main()
{
	int a, b;
	while (cin>>a>>b)
	{
		char s[7];
		sprintf_s(s, "%d", a + b);
		cout << strlen(s) << endl;
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
   10 |                 sprintf_s(s, "%d", a + b);
      |                 ^~~~~~~~~
      |                 sprintf
a.cc:11:25: error: 'strlen' was not declared in this scope
   11 |                 cout << strlen(s) << endl;
      |                         ^~~~~~
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 a, b;
	while (cin>>a>>b)
	{
		char s[7];
		sprintf(s, "%d", a + b);
		cout << strlen(s) << endl;
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: 'strlen' was not declared in this scope
   11 |                 cout << strlen(s) << endl;
      |                         ^~~~~~
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 c = 0;

void keta(int C) {
	if (C > 9) {
		c++;
		keta(C/10);
	}
	return;
}

int main()
{
	while (1) {
		if (cin.eof)
			break;
		c = 0;
		int A, B,C;
		cin >> A>> B;
		C = A + B;
		keta(C);
		c++;
		cout << c<<endl;
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:28: error: cannot convert 'std::basic_ios<char>::eof' from type 'bool (std::basic_ios<char>::)() const' to type 'bool'
   17 |                 if (cin.eof)
      |                            ^
Language: C++

#include<iostream>
#include<string.h>
using namespace std;
int main(){
int a,b,c;
char ans[10];
cin>>a>>b;
ans=(char)a+b;
c=strlen(ans);
cout<<c<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:4: error: incompatible types in assignment of 'int' to 'char [10]'
    8 | ans=(char)a+b;
      | ~~~^~~~~~~~~~
Language: C++

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

int main(){
	int a, b;
	while(cin >> a >> b){
		a = log10(a + b) + 1;
		cout << a << endl;
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'log10' was not declared in this scope
    9 |                 a = log10(a + b) + 1;
      |                     ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int x, y, count;
  cin >> x >> y;

  char ch[] = (char)(x + y);

  for(int i = 0; ch[i] == '\0'; ++i) {
    ++count;
  }
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: initializer fails to determine size of 'ch'
    8 |   char ch[] = (char)(x + y);
      |               ^~~~~~~~~~~~~
a.cc:8:15: error: array must be initialized with a brace-enclosed initializer
Language: C++

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
{
    int a, b, c, d;
    char s[10000];
    scanf("%d %d", &a, &b);
    c = a + b;
    itoa(c ,s , 10);
    d = strlen(s);
    printf("%d", d);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'itoa' was not declared in this scope
   10 |     itoa(c ,s , 10);
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int a,b,sum=0;
    cin>>a>>b;
    sum=a+b;
    if(sum<10)cout<<"1"<<endl;
    else if(sum<100)cout<<"2"<<endl;
    else if(sum<1000)cout<<"3"<<endl;
    else if(sum<10000)cout<<"4"<<endl;
    else if(sum<100000)cout<<"5"<<endl;
    else if(sum<1000000)cout<<"6"<<endl;
    else if(sum<10000000)cout<<"7"<<endl;
else if(sum<100000000)out<<"8"<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: 'out' was not declared in this scope
   14 | else if(sum<100000000)out<<"8"<<endl;
      |                       ^~~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int a,b,sum=0,count;
    while(cin>>a>>b){
        count++:
        sum=a+b;
        if(sum<10)cout<<"1"<<endl;
        else if(sum<100)cout<<"2"<<endl;
        else if(sum<1000)cout<<"3"<<endl;
        else if(sum<10000)cout<<"4"<<endl;
        else if(sum<100000)cout<<"5"<<endl;
        else if(sum<1000000)cout<<"6"<<endl;
        else if(sum<10000000)cout<<"7"<<endl;
        else if(sum<100000000)cout<<"8"<<endl;
        
        if(count==200)break;
        
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before ':' token
    6 |         count++:
      |                ^
      |                ;
Language: C++

#include <iostream>
#include <cmath>
using namespace std;

int main(){
	cin.tie(0);
   	ios::sync_with_stdio(false);

   	int a,b,c,ans;

	while(cin >> a >> b;){
   		c = a + b;
   		ans = (int)log10((double)c) + 1;
   		cout << ans << "\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: expected ')' before ';' token
   11 |         while(cin >> a >> b;){
      |              ~             ^
      |                            )
a.cc:11:29: error: expected primary-expression before ')' token
   11 |         while(cin >> a >> b;){
      |                             ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
int a,b;
int c[200][2]
for(int i=0;i<200,i++)
{
c[i][0]=a;
c[i][1]=b;
cin>>a>>b;
}
for(int j=0;j<200,j++)
{
if(c[j][1]+c[j][1]<10)
{
	cout<<1<<endl;
}
else if(c[j][0]+c[j][1]<100)
{
	cout<<2<<endl;
}
else if(c[j][0]+c[j][1]<1000)
{
	cout<<3<<endl;
}
else if(c[j][0]+c[j][1]<10000)
{
	cout<<4<<endl;
}
else if(c[j][0]+c[j][1]<100000)
{
	cout<<5<<endl;
}
else if(c[j][0]+c[j][1]<1000000)
{
	cout<<6<<endl;
}
else
{
	cout<<7<<endl;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected initializer before 'for'
    7 | for(int i=0;i<200,i++)
      | ^~~
a.cc:7:13: error: 'i' was not declared in this scope
    7 | for(int i=0;i<200,i++)
      |             ^
a.cc:13:22: error: expected ';' before ')' token
   13 | for(int j=0;j<200,j++)
      |                      ^
      |                      ;
a.cc:15:4: error: 'c' was not declared in this scope
   15 | if(c[j][1]+c[j][1]<10)
      |    ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
int a,b,i;
i=0;
while(cin>>a>>b;)
{
cin>>a>>b;
if(a+b<10)
{
	cout<<1<<endl;
}
else if(a+b<100)
{
	cout<<2<<endl;
}
else if(a+b<1000)
{
	cout<<3<<endl;
}
else if(a+b<10000)
{
	cout<<4<<endl;
}
else if(a+b<100000)
{
	cout<<5<<endl;
}
else if(a+b<1000000) 
{
	cout<<6<<endl;
}
else if(a+b<10000000)
{
	cout<<7<<endl;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ')' before ';' token
    7 | while(cin>>a>>b;)
      |      ~         ^
      |                )
a.cc:7:17: error: expected primary-expression before ')' token
    7 | while(cin>>a>>b;)
      |                 ^
Language: C++

int main()
{
	int a, b,sum,n;
	n = 0;


	while (cin >> a >> b)
	{
		sum = a + b;

		for (;;)
		{
			sum = sum / 10;
			n = n + 1;

			if (sum == 0)
			{
				break;
			}
		}

		cout << n << endl;
	}

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'cin' was not declared in this scope
    7 |         while (cin >> a >> b)
      |                ^~~
a.cc:22:17: error: 'cout' was not declared in this scope
   22 |                 cout << n << endl;
      |                 ^~~~
a.cc:22:30: error: 'endl' was not declared in this scope
   22 |                 cout << n << endl;
      |                              ^~~~
Language: C++

#include<stdio.h>
int main(void)
{
    int a,b,i,n;
	scanf("%d %d",&a,&b);
	a=a+b;
	for(i=1;i<8;i++){
		if(a<10){
			break;
		}
		a=a/10
	}
	printf("%d\n",i);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: expected ';' before '}' token
   11 |                 a=a/10
      |                       ^
      |                       ;
   12 |         }
      |         ~
Language: C++

#include <vector>

#ifndef EOF
#define EOF (-1)
#endif

int main() {
    std::vector<int> digits;
    int a, b;
    while (scanf("%d %d", &a, &b) != EOF)
    {
        int sum = a + b;
        int t = sum / 10;
        int digit = 0;
        while (t > 0) {
            digit ++;
            t = t / 10;
        }
        digits.push_back(digit);
    }

    for (int i = 0; i < digits.size(); i++) {
        std::cout << digits[i] << std::endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'scanf' was not declared in this scope
   10 |     while (scanf("%d %d", &a, &b) != EOF)
      |            ^~~~~
a.cc:23:14: error: 'cout' is not a member of 'std'
   23 |         std::cout << digits[i] << std::endl;
      |              ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <vector>
  +++ |+#include <iostream>
    2 | 
a.cc:23:40: error: 'endl' is not a member of 'std'
   23 |         std::cout << digits[i] << std::endl;
      |                                        ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <vector>
  +++ |+#include <ostream>
    2 |
Language: C++

#include<iostream>
#include<vector>
#include<map>
#include<string>
using namespace std;

int get_digit(int num);

int main() {
	int first;
	int second;
	int data_cnt = 0;
	std::vector<int> inputs;

	while ((cin >> first >> second) || (data_cnt < 200)) {
		data_cnt++;
		inputs.push_back(first + second);
	}

	for (int i = 0; i < data_cnt; i++) {
		cout << get_digit(inputs[i]) << endl;
	}

	return 0;
}

int get_digit(int num) {
	return std::to_string(num).length();
}

template < typename T > std::string to_string(const T& n)
{
	std::ostringstream stm;
	stm << n;
	return stm.str();
}

Compiler output:
a.cc: In function 'std::string to_string(const T&)':
a.cc:33:28: error: 'stm' has incomplete type
   33 |         std::ostringstream stm;
      |                            ^~~
In file included from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/iosfwd:106:11: note: declaration of 'std::ostringstream' {aka 'class std::__cxx11::basic_ostringstream<char>'}
  106 |     class basic_ostringstream;
      |           ^~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<map>
#include<string>
using namespace std;

int get_digit(int num);

template < typename T > std::string to_string(const T& n)
{
	std::ostringstream stm;
	stm << n;
	return stm.str();
}

int main() {
	int first;
	int second;
	int data_cnt = 0;
	std::vector<int> inputs;

	while ((cin >> first >> second) || (data_cnt < 200)) {
		data_cnt++;
		inputs.push_back(first + second);
	}

	for (int i = 0; i < data_cnt; i++) {
		cout << get_digit(inputs[i]) << endl;
	}

	return 0;
}

int get_digit(int num) {
	return std::to_string(num).length();
}

Compiler output:
a.cc: In function 'std::string to_string(const T&)':
a.cc:11:28: error: 'stm' has incomplete type
   11 |         std::ostringstream stm;
      |                            ^~~
In file included from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/iosfwd:106:11: note: declaration of 'std::ostringstream' {aka 'class std::__cxx11::basic_ostringstream<char>'}
  106 |     class basic_ostringstream;
      |           ^~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<map>
#include<string>
using namespace std;

int get_digit(int num);

int main() {
	int first;
	int second;
	int data_cnt = 0;
	std::vector<int> inputs;

	while ((cin >> first >> second) || (data_cnt < 200)) {
		data_cnt++;
		inputs.push_back(first + second);
	}

	for (int i = 0; i < data_cnt; i++) {
		cout << get_digit(inputs[i]) << endl;
	}

	return 0;
}

int get_digit(int num) {
	return log10(num) + 1;
}

Compiler output:
a.cc: In function 'int get_digit(int)':
a.cc:28:16: error: 'log10' was not declared in this scope
   28 |         return log10(num) + 1;
      |                ^~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int x,y;
    for(;;){
        cin >> x >> y;
        if(cin.eof())   break;
        cout << to_string(a+b).length() << "\n";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: 'a' was not declared in this scope
   11 |         cout << to_string(a+b).length() << "\n";
      |                           ^
a.cc:11:29: error: 'b' was not declared in this scope
   11 |         cout << to_string(a+b).length() << "\n";
      |                             ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int x,y;
    for(;;){
        cin >> x >> y;
        if(cin.eof())   break;
        cout << to_string(x+y).length() << "\n";
    }
}
template < typename T > std::string to_string( const T& n ){
    std::ostringstream stm ;
    stm << n ;
    return stm.str() ;
}

Compiler output:
a.cc: In function 'std::string to_string(const T&)':
a.cc:15:24: error: 'stm' has incomplete type
   15 |     std::ostringstream stm ;
      |                        ^~~
In file included from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/iosfwd:106:11: note: declaration of 'std::ostringstream' {aka 'class std::__cxx11::basic_ostringstream<char>'}
  106 |     class basic_ostringstream;
      |           ^~~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int a, b, i = 10;
	while (cin >> a >> b) {
		for (int j = 1;; j++) {
			if (a + b < pow(10, j)) {
				cout << j << endl; 
				break;
			}
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: 'pow' was not declared in this scope
    9 |                         if (a + b < pow(10, j)) {
      |                                     ^~~