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

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

int a,b;
char op;
int ans;

int main() {
  while(0) {
    xin >> a >> op >> b;
    if ( op == +) {
      ans = a + b;
    }else if ( op == -) {
      ans = a - b;
    }else if ( op == *) {
      ans = a * b;
    }else if ( op == /) {
      ans = a / b;
    }else if ( op == ?) {
      break;
    }
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'xin' was not declared in this scope; did you mean 'sin'?
   10 |     xin >> a >> op >> b;
      |     ^~~
      |     sin
a.cc:11:17: error: expected primary-expression before ')' token
   11 |     if ( op == +) {
      |                 ^
a.cc:13:23: error: expected primary-expression before ')' token
   13 |     }else if ( op == -) {
      |                       ^
a.cc:15:23: error: expected primary-expression before ')' token
   15 |     }else if ( op == *) {
      |                       ^
a.cc:17:22: error: expected primary-expression before '/' token
   17 |     }else if ( op == /) {
      |                      ^
a.cc:17:23: error: expected primary-expression before ')' token
   17 |     }else if ( op == /) {
      |                       ^
a.cc:19:22: error: expected primary-expression before '?' token
   19 |     }else if ( op == ?) {
      |                      ^
a.cc:19:23: error: expected primary-expression before ')' token
   19 |     }else if ( op == ?) {
      |                       ^
a.cc:19:23: error: expected ':' before ')' token
   19 |     }else if ( op == ?) {
      |                       ^
      |                       :
a.cc:19:23: error: expected primary-expression before ')' token
Language: C++

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

int a,b;
char op;
int ans;

int main() {
  while(0) {
    cin >> a >> op >> b;
    if ( op == +) {
      ans = a + b;
    }else if ( op == -) {
      ans = a - b;
    }else if ( op == *) {
      ans = a * b;
    }else if ( op == /) {
      ans = a / b;
    }else if ( op == ?) {
      break;
    }
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected primary-expression before ')' token
   11 |     if ( op == +) {
      |                 ^
a.cc:13:23: error: expected primary-expression before ')' token
   13 |     }else if ( op == -) {
      |                       ^
a.cc:15:23: error: expected primary-expression before ')' token
   15 |     }else if ( op == *) {
      |                       ^
a.cc:17:22: error: expected primary-expression before '/' token
   17 |     }else if ( op == /) {
      |                      ^
a.cc:17:23: error: expected primary-expression before ')' token
   17 |     }else if ( op == /) {
      |                       ^
a.cc:19:22: error: expected primary-expression before '?' token
   19 |     }else if ( op == ?) {
      |                      ^
a.cc:19:23: error: expected primary-expression before ')' token
   19 |     }else if ( op == ?) {
      |                       ^
a.cc:19:23: error: expected ':' before ')' token
   19 |     }else if ( op == ?) {
      |                       ^
      |                       :
a.cc:19:23: error: expected primary-expression before ')' token
Language: C++

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

int a,b;
char op;
int ans;

int main() {
  while(0) {
    cin >> a >> op >> b;
    if ( op == "+") {
      ans = a + b;
    }else if ( op == -) {
      ans = a - b;
    }else if ( op == "*") {
      ans = a * b;
    }else if ( op == "/") {
      ans = a / b;
    }else if ( op == "?") {
      break;
    }
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if ( op == "+") {
      |          ~~~^~~~~~
a.cc:13:23: error: expected primary-expression before ')' token
   13 |     }else if ( op == -) {
      |                       ^
a.cc:15:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     }else if ( op == "*") {
      |                ~~~^~~~~~
a.cc:17:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     }else if ( op == "/") {
      |                ~~~^~~~~~
a.cc:19:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     }else if ( op == "?") {
      |                ~~~^~~~~~
Language: C++

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

int a,b;
char op;
int ans;

int main() {
  while(0) {
    cin >> a >> op >> b;
    if ( op == "+") {
      ans = a + b;
    }else if ( op = "-") {
      ans = a - b;
    }else if ( op == "*") {
      ans = a * b;
    }else if ( op == "/") {
      ans = a / b;
    }else if ( op == "?") {
      break;
    }
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if ( op == "+") {
      |          ~~~^~~~~~
a.cc:13:21: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   13 |     }else if ( op = "-") {
      |                     ^~~
      |                     |
      |                     const char*
a.cc:15:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     }else if ( op == "*") {
      |                ~~~^~~~~~
a.cc:17:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |     }else if ( op == "/") {
      |                ~~~^~~~~~
a.cc:19:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     }else if ( op == "?") {
      |                ~~~^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a, b;
  char op;
  while (true){
    cin >> a >> op >> b;
    if (op == "?") break;
    if (op == "+") cout << a+b << endl;
    if (op == "-") cout << a-b << endl;
    if (op == "*") cout << a*b << endl;
    if (op == "/") cout << a/b << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if (op == "?") break;
      |         ~~~^~~~~~
a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (op == "+") cout << a+b << endl;
      |         ~~~^~~~~~
a.cc:11:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if (op == "-") cout << a-b << endl;
      |         ~~~^~~~~~
a.cc:12:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if (op == "*") cout << a*b << endl;
      |         ~~~^~~~~~
a.cc:13:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if (op == "/") cout << a/b << endl;
      |         ~~~^~~~~~
Language: C++

#include<iostream>

using namespace std;

int main()
{
	int a,b;
	char op;

		cin >> a >> op >> b;
	if(op == '+')
	{
		cout << a + b << endl;
	}
	else if (op == '-')
	{
		cout << a - b << endl;
	}
	else if(op == '*')
	{
		cout << a * b << endl;
	}
	else if(op == '/')
	{
		cout << a / b << endl;
	}
	else if(op == '?') break;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:28: error: break statement not within loop or switch
   27 |         else if(op == '?') break;
      |                            ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
 int a, b;
 char op;

 while(1){
  cin >> a >> op >> b;
  if( op == + ){
  cout << a + b << endl;
  }else if( op == - ){
  cout << a - b << endl;
  }else if( op == * ){
  cout << a * b << endl;
  }else if( op == / ){
  cout << a / b << endl;
  }else if( op == ? )break;
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected primary-expression before ')' token
   10 |   if( op == + ){
      |               ^
a.cc:12:21: error: expected primary-expression before ')' token
   12 |   }else if( op == - ){
      |                     ^
a.cc:14:21: error: expected primary-expression before ')' token
   14 |   }else if( op == * ){
      |                     ^
a.cc:16:19: error: expected primary-expression before '/' token
   16 |   }else if( op == / ){
      |                   ^
a.cc:16:21: error: expected primary-expression before ')' token
   16 |   }else if( op == / ){
      |                     ^
a.cc:18:19: error: expected primary-expression before '?' token
   18 |   }else if( op == ? )break;
      |                   ^
a.cc:18:21: error: expected primary-expression before ')' token
   18 |   }else if( op == ? )break;
      |                     ^
a.cc:18:20: error: expected ':' before ')' token
   18 |   }else if( op == ? )break;
      |                    ^~
      |                    :
a.cc:18:21: error: expected primary-expression before ')' token
   18 |   }else if( op == ? )break;
      |                     ^
Language: C++

#include <iostream>

using namespace std;

int main(){
  int a,b;
  string op;
  vector<int> ans;
  while(1){
    cin >> a >> op >> b;
    if(op == "+"){
      ans.push_back(a+b);
    }else if(op == "-"){
      ans.push_back(a-b);
    }else if(op == "*"){
      ans.push_back(a*b);
    }else if(op == "/"){
      ans.push_back(a/b);
    }else if(op == "?"){
      break;
    }
  }
  for(auto x: ans){
    cout << x << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int> ans;
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | 
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> ans;
      |          ^~~
a.cc:12:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |       ans.push_back(a+b);
      |       ^~~
      |       abs
a.cc:14:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |       ans.push_back(a-b);
      |       ^~~
      |       abs
a.cc:16:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |       ans.push_back(a*b);
      |       ^~~
      |       abs
a.cc:18:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |       ans.push_back(a/b);
      |       ^~~
      |       abs
a.cc:23:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |   for(auto x: ans){
      |               ^~~
      |               abs
Language: C++

#include <iostream>
int main(){
int a, b;
char op = '/';
while(1){
std::cin >> a  >> op >> b;
if(op=='?'){
break;
}
switch(op){
case '+':
std::court << a+b << std::endl;
break;
case '-':
std::cout<<a-b << std::endl;
break;
case '/':
std::cout<<a/b<<std::endl;
break;
case '*':
std::cour<<a*b<<std::endl;


}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: 'court' is not a member of 'std'; did you mean 'cout'?
   12 | std::court << a+b << std::endl;
      |      ^~~~~
      |      cout
a.cc:21:6: error: 'cour' is not a member of 'std'; did you mean 'cout'?
   21 | std::cour<<a*b<<std::endl;
      |      ^~~~
      |      cout
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a,b;
	char op;

	while(1){
	cin >> a >> op >> b;
		if(op == ?)break;
		else if(op == +) cout << a + b << endl;
		else if(op == -) cout << a - b << endl;
		else if(op == *) cout << a * b << endl;
		else if(op == /) cout << a / b << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: expected primary-expression before '?' token
   10 |                 if(op == ?)break;
      |                          ^
a.cc:10:27: error: expected primary-expression before ')' token
   10 |                 if(op == ?)break;
      |                           ^
a.cc:10:27: error: expected ':' before ')' token
   10 |                 if(op == ?)break;
      |                           ^
      |                           :
a.cc:10:27: error: expected primary-expression before ')' token
a.cc:11:32: error: expected primary-expression before ')' token
   11 |                 else if(op == +) cout << a + b << endl;
      |                                ^
a.cc:12:32: error: expected primary-expression before ')' token
   12 |                 else if(op == -) cout << a - b << endl;
      |                                ^
a.cc:13:32: error: expected primary-expression before ')' token
   13 |                 else if(op == *) cout << a * b << endl;
      |                                ^
a.cc:14:31: error: expected primary-expression before '/' token
   14 |                 else if(op == /) cout << a / b << endl;
      |                               ^
a.cc:14:32: error: expected primary-expression before ')' token
   14 |                 else if(op == /) cout << a / b << endl;
      |                                ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a,b;
	char op;

	while(1){
	cin >> a >> op >> b;
		if(op == "?")break;
		else if(op == "+") cout << a + b << endl;
		else if(op == "-") cout << a - b << endl;
		else if(op == "*") cout << a * b << endl;
		else if(op == "/") cout << a / b << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |                 if(op == "?")break;
      |                    ~~~^~~~~~
a.cc:11:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |                 else if(op == "+") cout << a + b << endl;
      |                         ~~~^~~~~~
a.cc:12:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |                 else if(op == "-") cout << a - b << endl;
      |                         ~~~^~~~~~
a.cc:13:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |                 else if(op == "*") cout << a * b << endl;
      |                         ~~~^~~~~~
a.cc:14:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 else if(op == "/") cout << a / b << endl;
      |                         ~~~^~~~~~
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
while(0){
if(b=?)
break;
else if(b=+){
cout<<a+c<<endl;
}
else if(b=-){
cout<<a-c<<endl;
}
else if(b=*){
cout<<a*c<<endl;
}
else if(b=/){
cout<<a/c<<endl;
}
};
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected primary-expression before '?' token
    8 | if(b=?)
      |      ^
a.cc:8:7: error: expected primary-expression before ')' token
    8 | if(b=?)
      |       ^
a.cc:8:7: error: expected ':' before ')' token
    8 | if(b=?)
      |       ^
      |       :
a.cc:8:7: error: expected primary-expression before ')' token
a.cc:10:12: error: expected primary-expression before ')' token
   10 | else if(b=+){
      |            ^
a.cc:13:12: error: expected primary-expression before ')' token
   13 | else if(b=-){
      |            ^
a.cc:16:12: error: expected primary-expression before ')' token
   16 | else if(b=*){
      |            ^
a.cc:19:11: error: expected primary-expression before '/' token
   19 | else if(b=/){
      |           ^
a.cc:19:12: error: expected primary-expression before ')' token
   19 | else if(b=/){
      |            ^
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
while(0){
if(b==?)
break;
else if(b==+){
cout<<a+c<<endl;
}
else if(b==-){
cout<<a-c<<endl;
}
else if(b==*){
cout<<a*c<<endl;
}
else if(b==/){
cout<<a/c<<endl;
}
};
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: expected primary-expression before '?' token
    8 | if(b==?)
      |       ^
a.cc:8:8: error: expected primary-expression before ')' token
    8 | if(b==?)
      |        ^
a.cc:8:8: error: expected ':' before ')' token
    8 | if(b==?)
      |        ^
      |        :
a.cc:8:8: error: expected primary-expression before ')' token
a.cc:10:13: error: expected primary-expression before ')' token
   10 | else if(b==+){
      |             ^
a.cc:13:13: error: expected primary-expression before ')' token
   13 | else if(b==-){
      |             ^
a.cc:16:13: error: expected primary-expression before ')' token
   16 | else if(b==*){
      |             ^
a.cc:19:12: error: expected primary-expression before '/' token
   19 | else if(b==/){
      |            ^
a.cc:19:13: error: expected primary-expression before ')' token
   19 | else if(b==/){
      |             ^
Language: C++

int main() {
	int a, o, c;
	
	while (1) {
		cin >> a >> o >> c;
		if (o == '?') break;
		if (o== '+') {
			cout << a + c << endl;
		}
		else if (o == '-') {
			cout << a - c << endl;
		}
		else if (o == '*') {
			cout << a*c << endl;
		}
		else if (o == '/' ) {
			printf("%d\n", a / c);
		}
		else {
			break;
		}
	};
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope
    5 |                 cin >> a >> o >> c;
      |                 ^~~
a.cc:8:25: error: 'cout' was not declared in this scope
    8 |                         cout << a + c << endl;
      |                         ^~~~
a.cc:8:42: error: 'endl' was not declared in this scope
    8 |                         cout << a + c << endl;
      |                                          ^~~~
a.cc:11:25: error: 'cout' was not declared in this scope
   11 |                         cout << a - c << endl;
      |                         ^~~~
a.cc:11:42: error: 'endl' was not declared in this scope
   11 |                         cout << a - c << endl;
      |                                          ^~~~
a.cc:14:25: error: 'cout' was not declared in this scope
   14 |                         cout << a*c << endl;
      |                         ^~~~
a.cc:14:40: error: 'endl' was not declared in this scope
   14 |                         cout << a*c << endl;
      |                                        ^~~~
a.cc:17:25: error: 'printf' was not declared in this scope
   17 |                         printf("%d\n", a / c);
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
int main() {
	int a, c;
	char o;
	while (1) {
		scanf("%d %c %d",&a,&o,&c);
		if (o == '?') break;
		else if (o == '+') {
			cout << a + c << endl;
		}
		else if (o == '-') {
			cout << a - c << endl;
		}
		else if (o == '*') {
			cout << a * c << endl;
		}
		else if (o == '/') {
			printf("%d\n", a / c);
		}
		else
			return 0;
	}
	return 0;

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

#include <iostream>
using namespace std;

int main() {
	int a, b;
	char op;
	
	while(1){
		cin >> a >> op >>b;
		if (op == '?') break;
		
		if (op == "+") cout << a+b << endl;
		else if ( op == "-") cout << a-b <<endl;
		else if ( op == "*") cout << a*b << endl;
		else if ( op == "/") cout << a/b << endl;
		
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |                 if (op == "+") cout << a+b << endl;
      |                     ~~~^~~~~~
a.cc:13:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |                 else if ( op == "-") cout << a-b <<endl;
      |                           ~~~^~~~~~
a.cc:14:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 else if ( op == "*") cout << a*b << endl;
      |                           ~~~^~~~~~
a.cc:15:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |                 else if ( op == "/") cout << a/b << endl;
      |                           ~~~^~~~~~
Language: C++

int main(){
	int a,b,d;
	char op;
	while(1){
		scanf("%d %c %d",&a,&op,&b);
	if(op=='+'){
		d=a+b;
		printf("%d\n",d);}
	else if(op=='-'){
		d=a-b;
		printf("%d\n",d);}
	else if(op=='*'){
		d=a*b;
		printf("%d\n",d);}
	else if(op=='/'){
		d=a/b;
		printf("%d\n",d);}
	else if(op=='?'){
		break;}
	}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'scanf' was not declared in this scope
    5 |                 scanf("%d %c %d",&a,&op,&b);
      |                 ^~~~~
a.cc:8:17: error: 'printf' was not declared in this scope
    8 |                 printf("%d\n",d);}
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:11:17: error: 'printf' was not declared in this scope
   11 |                 printf("%d\n",d);}
      |                 ^~~~~~
a.cc:11:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:14:17: error: 'printf' was not declared in this scope
   14 |                 printf("%d\n",d);}
      |                 ^~~~~~
a.cc:14:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:17:17: error: 'printf' was not declared in this scope
   17 |                 printf("%d\n",d);}
      |                 ^~~~~~
a.cc:17:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>
#include<math.h>
int main(){
    int a,b;
    char op;
    while(1){
        cin>>a>>op>>b;
        if(op=="?")break;
        if else(op=="+")cout<<a+b<<endl;
        if else(op=="-")cout<<a-b<<endl;
        if else(op=="*")cout<<a*b<<endl;
        if else(op=="/")cout<<a/b<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin>>a>>op>>b;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if(op=="?")break;
      |            ~~^~~~~
a.cc:9:12: error: expected '(' before 'else'
    9 |         if else(op=="+")cout<<a+b<<endl;
      |            ^~~~
      |            (
a.cc:10:12: error: expected '(' before 'else'
   10 |         if else(op=="-")cout<<a-b<<endl;
      |            ^~~~
      |            (
a.cc:11:12: error: expected '(' before 'else'
   11 |         if else(op=="*")cout<<a*b<<endl;
      |            ^~~~
      |            (
a.cc:12:12: error: expected '(' before 'else'
   12 |         if else(op=="/")cout<<a/b<<endl;
      |            ^~~~
      |            (
Language: C++

#include<iostream>
#include<math.h>
int main(){
    int a,b;
    char op;
    while(1){
        cin>>a>>op>>b;
        if(op=="?")break;
        if else(op=="+")cout<<a+b<<endl;
        if else(op=="-")cout<<a-b<<endl;
        if else(op=="*")cout<<a*b<<endl;
        else(op=="/")cout<<a/b<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |         cin>>a>>op>>b;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if(op=="?")break;
      |            ~~^~~~~
a.cc:9:12: error: expected '(' before 'else'
    9 |         if else(op=="+")cout<<a+b<<endl;
      |            ^~~~
      |            (
a.cc:10:12: error: expected '(' before 'else'
   10 |         if else(op=="-")cout<<a-b<<endl;
      |            ^~~~
      |            (
a.cc:11:12: error: expected '(' before 'else'
   11 |         if else(op=="*")cout<<a*b<<endl;
      |            ^~~~
      |            (
a.cc:12:9: error: 'else' without a previous 'if'
   12 |         else(op=="/")cout<<a/b<<endl;
      |         ^~~~
a.cc:12:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         else(op=="/")cout<<a/b<<endl;
      |              ~~^~~~~
a.cc:12:22: error: expected ';' before 'cout'
   12 |         else(op=="/")cout<<a/b<<endl;
      |                      ^~~~
      |                      ;
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b;
    char op;
    while(1){
        cin>>a>>op>>b;
        if(op=="?")break;
        else if(op=="+")cout<<a+b<<endl;
        else if(op=="-")cout<<a-b<<endl;
        else if(op=="*")cout<<a*b<<endl;
        else if(op=="/")cout<<a/b<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if(op=="?")break;
      |            ~~^~~~~
a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         else if(op=="+")cout<<a+b<<endl;
      |                 ~~^~~~~
a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         else if(op=="-")cout<<a-b<<endl;
      |                 ~~^~~~~
a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         else if(op=="*")cout<<a*b<<endl;
      |                 ~~^~~~~
a.cc:12:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         else if(op=="/")cout<<a/b<<endl;
      |                 ~~^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b;
    char op;
    while(1){
        cin>>a>>op>>b;
        if(op=="?")break;
        else if(op=="+")cout<<a+b<<endl;
        else if(op=="-")cout<<a-b<<endl;
        else if(op=="*")cout<<a*b<<endl;
        else if(op=="/")cout<<a/b<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if(op=="?")break;
      |            ~~^~~~~
a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         else if(op=="+")cout<<a+b<<endl;
      |                 ~~^~~~~
a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         else if(op=="-")cout<<a-b<<endl;
      |                 ~~^~~~~
a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         else if(op=="*")cout<<a*b<<endl;
      |                 ~~^~~~~
a.cc:12:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         else if(op=="/")cout<<a/b<<endl;
      |                 ~~^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b;
    char op;
    while(1){
        cin>>a>>op>>b;
        if(op=="?")break;
        if(op=="+")cout<<a+b<<endl;
        else if(op=="-")cout<<a-b<<endl;
        else if(op=="*")cout<<a*b<<endl;
        else if(op=="/")cout<<a/b<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if(op=="?")break;
      |            ~~^~~~~
a.cc:9:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(op=="+")cout<<a+b<<endl;
      |            ~~^~~~~
a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         else if(op=="-")cout<<a-b<<endl;
      |                 ~~^~~~~
a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         else if(op=="*")cout<<a*b<<endl;
      |                 ~~^~~~~
a.cc:12:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         else if(op=="/")cout<<a/b<<endl;
      |                 ~~^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b;
    char op;
    while(1){
        cin>>a>>op>>b;
        if(op=="?")break;
        if(op=="+") cout<<a+b<<endl;
        else if(op=="-") cout<<a-b<<endl;
        else if(op=="*") cout<<a*b<<endl;
        else if(op=="/") cout<<a/b<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if(op=="?")break;
      |            ~~^~~~~
a.cc:9:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(op=="+") cout<<a+b<<endl;
      |            ~~^~~~~
a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         else if(op=="-") cout<<a-b<<endl;
      |                 ~~^~~~~
a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         else if(op=="*") cout<<a*b<<endl;
      |                 ~~^~~~~
a.cc:12:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         else if(op=="/") cout<<a/b<<endl;
      |                 ~~^~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
 string s;
 for(;;)
 {
  getline(cin, s)
  char o = s[2];
  int a = s[0] - '0';
  int b = s[4] - '0';
  if(o == '+') cout << a + b << endl;
  else if (o == '-') cout << a - b << endl;
  else if (o == '*') cout << a * b << endl;
  else if (o == '/') cout << a / b << endl;
  else break;
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before 'char'
    9 |   getline(cin, s)
      |                  ^
      |                  ;
   10 |   char o = s[2];
      |   ~~~~            
a.cc:13:6: error: 'o' was not declared in this scope
   13 |   if(o == '+') cout << a + b << endl;
      |      ^
Language: C++

#include <iostream>
using namespace std;
int main(){
int a,b;
char x;
cin>>a>>x>>b;
if(x==+)cout<<a+b<<endl;
if(x==-)cout<<a-b<<endl;
if(x==*)cout<<a*b<<endl;
if(x==/)cout<<a/b<<endl;
if(x==?)break;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected primary-expression before ')' token
    7 | if(x==+)cout<<a+b<<endl;
      |        ^
a.cc:8:8: error: expected primary-expression before ')' token
    8 | if(x==-)cout<<a-b<<endl;
      |        ^
a.cc:9:8: error: expected primary-expression before ')' token
    9 | if(x==*)cout<<a*b<<endl;
      |        ^
a.cc:10:7: error: expected primary-expression before '/' token
   10 | if(x==/)cout<<a/b<<endl;
      |       ^
a.cc:10:8: error: expected primary-expression before ')' token
   10 | if(x==/)cout<<a/b<<endl;
      |        ^
a.cc:11:7: error: expected primary-expression before '?' token
   11 | if(x==?)break;
      |       ^
a.cc:11:8: error: expected primary-expression before ')' token
   11 | if(x==?)break;
      |        ^
a.cc:11:8: error: expected ':' before ')' token
   11 | if(x==?)break;
      |        ^
      |        :
a.cc:11:8: error: expected primary-expression before ')' token
a.cc:11:9: error: break statement not within loop or switch
   11 | if(x==?)break;
      |         ^~~~~
Language: C++

#include <iostream>
int main(){
int a,b;
char o;
while(1){
std::cin>>a>>o>>b;
if(o=="0")break;
else if(o=="+")std::cout<<a+b;
else if(o=="-")std::cout<<a-b;
else if(o=="*")std::cout<<a*b;
else std::cout<<a/b;
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 | if(o=="0")break;
      |    ~^~~~~
a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 | else if(o=="+")std::cout<<a+b;
      |         ~^~~~~
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 | else if(o=="-")std::cout<<a-b;
      |         ~^~~~~
a.cc:10:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | else if(o=="*")std::cout<<a*b;
      |         ~^~~~~
Language: C++

#include <iostream>
int main(){
int a,b;
char*[1] o;
while(1){
std::cin>>a>>o>>b;
if(o=="0")break;
else if(o=="+")std::cout<<a+b;
else if(o=="-")std::cout<<a-b;
else if(o=="*")std::cout<<a*b;
else std::cout<<a/b;
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:6: error: expected unqualified-id before '[' token
    4 | char*[1] o;
      |      ^
a.cc:6:14: error: 'o' was not declared in this scope
    6 | std::cin>>a>>o>>b;
      |              ^
Language: C++

#include <iostream>
#include <string>
int main(){
int a,b;
string o;
while(1){
std::cin>>a>>o>>b;
if(o=="0")break;
else if(o=="+")std::cout<<a+b;
else if(o=="-")std::cout<<a-b;
else if(o=="*")std::cout<<a*b;
else std::cout<<a/b;
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | string o;
      | ^~~~~~
a.cc:5:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 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/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:14: error: 'o' was not declared in this scope
    7 | std::cin>>a>>o>>b;
      |              ^
Language: C++

#include <iostream>
#include <String>
int main(){
int a,b;
String o;
while(1){
std::cin>>a>>o>>b;
if(o=="0")break;
else if(o=="+")std::cout<<a+b;
else if(o=="-")std::cout<<a-b;
else if(o=="*")std::cout<<a*b;
else std::cout<<a/b;
}

return 0;
}

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

#include <iostream>
#include <string>
int main(){
int a,b;
String o;
while(1){
std::cin>>a>>o>>b;
if(o=="0")break;
else if(o=="+")std::cout<<a+b;
else if(o=="-")std::cout<<a-b;
else if(o=="*")std::cout<<a*b;
else std::cout<<a/b;
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'String' was not declared in this scope
    5 | String o;
      | ^~~~~~
a.cc:7:14: error: 'o' was not declared in this scope
    7 | std::cin>>a>>o>>b;
      |              ^
Language: C++

#include <iostream>


int main(){
int a,b;
char op;

while(1){

std::cin>>a>>op>>b;
if(op == '?'){
break;
} else if(op == '+'){
std::cout<<a+b<<"\n";
} else if(op == '-'){
std::cout<<a-b<<"\n";
} else if( op == '*'){
std::cout<<a*b<<"\n";
} else if(op == '/'){
std::cout<<a/b<<"\n";
} else {
???break;
}

}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:1: error: expected primary-expression before '?' token
   22 | ???break;
      | ^
a.cc:22:2: error: expected primary-expression before '?' token
   22 | ???break;
      |  ^
a.cc:22:3: error: expected primary-expression before '?' token
   22 | ???break;
      |   ^
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
Language: C++

#include <iostream>


int main(){
int a,b;
char p;

while(1){

std::cin>>a>>p>>b;
if(op == '?'){
break;
} else if(p == '+'){
std::cout<<a+b<<"\n";
} else if(p == '-'){
std::cout<<a-b<<"\n";
} else if( p == '*'){
std::cout<<a*b<<"\n";
} else if(p == '/'){
std::cout<<a/b<<"\n";
} else {
???break;
}

}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:4: error: 'op' was not declared in this scope; did you mean 'p'?
   11 | if(op == '?'){
      |    ^~
      |    p
a.cc:22:1: error: expected primary-expression before '?' token
   22 | ???break;
      | ^
a.cc:22:2: error: expected primary-expression before '?' token
   22 | ???break;
      |  ^
a.cc:22:3: error: expected primary-expression before '?' token
   22 | ???break;
      |   ^
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
Language: C++

#include <iostream>


int main(){
int a,b;
char p;

while(1){

std::cin>>a>>p>>b;
if(p == '?'){
break;
} else if(p == '+'){
std::cout<<a+b<<"\n";
} else if(p == '-'){
std::cout<<a-b<<"\n";
} else if( p == '*'){
std::cout<<a*b<<"\n";
} else if(p == '/'){
std::cout<<a/b<<"\n";
} else {
???break;
}

}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:1: error: expected primary-expression before '?' token
   22 | ???break;
      | ^
a.cc:22:2: error: expected primary-expression before '?' token
   22 | ???break;
      |  ^
a.cc:22:3: error: expected primary-expression before '?' token
   22 | ???break;
      |   ^
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
Language: C++

#include <iostream>


int main(){
int a,b;
char p;

while(1){

std::cin>>a>>p>>b;
if(p == '\?'){
break;
} else if(p == '\+'){
std::cout<<a+b<<"\n";
} else if(p == '\-'){
std::cout<<a-b<<"\n";
} else if( p == '\*'){
std::cout<<a*b<<"\n";
} else if(p == '\/'){
std::cout<<a/b<<"\n";
} else {
???break;
}

}

return 0;
}

Compiler output:
a.cc:13:16: warning: unknown escape sequence: '\+'
   13 | } else if(p == '\+'){
      |                ^~~~
a.cc:15:16: warning: unknown escape sequence: '\-'
   15 | } else if(p == '\-'){
      |                ^~~~
a.cc:17:17: warning: unknown escape sequence: '\*'
   17 | } else if( p == '\*'){
      |                 ^~~~
a.cc:19:16: warning: unknown escape sequence: '\/'
   19 | } else if(p == '\/'){
      |                ^~~~
a.cc: In function 'int main()':
a.cc:22:1: error: expected primary-expression before '?' token
   22 | ???break;
      | ^
a.cc:22:2: error: expected primary-expression before '?' token
   22 | ???break;
      |  ^
a.cc:22:3: error: expected primary-expression before '?' token
   22 | ???break;
      |   ^
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
Language: C++

#include <iostream>


int main(){
int a,b;
char p;

while(1){

std::cin>>a>>p>>b;
if(p == '?'){
break;
} else if(p=='+'){
std::cout<<a+b<<"\n";
} else if(p=='-'){
std::cout<<a-b<<"\n";
} else if(p=='*'){
std::cout<<a*b<<"\n";
} else if(p=='/'){
std::cout<<a/b<<"\n";
} else {
???break;
}

}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:1: error: expected primary-expression before '?' token
   22 | ???break;
      | ^
a.cc:22:2: error: expected primary-expression before '?' token
   22 | ???break;
      |  ^
a.cc:22:3: error: expected primary-expression before '?' token
   22 | ???break;
      |   ^
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
Language: C++

#include <iostream>


int main(){
int a,b;
char p;

while(1){

std::cin>>a>>p>>b;
if(p=='?'){
break;
} else if(p=='+'){
std::cout<<a+b<<"\n";
} else if(p=='-'){
std::cout<<a-b<<"\n";
} else if(p=='*'){
std::cout<<a*b<<"\n";
} else if(p=='/'){
std::cout<<a/b<<"\n";
} else {
???break;
}

}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:1: error: expected primary-expression before '?' token
   22 | ???break;
      | ^
a.cc:22:2: error: expected primary-expression before '?' token
   22 | ???break;
      |  ^
a.cc:22:3: error: expected primary-expression before '?' token
   22 | ???break;
      |   ^
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
a.cc:22:4: error: expected ':' before 'break'
   22 | ???break;
      |    ^~~~~
      |    :
a.cc:22:4: error: expected primary-expression before 'break'
   22 | ???break;
      |    ^~~~~
Language: C++

#include<stdio.h>
int main(void){
	int a,b=0;
	char op;
	for(;;){
		scanf("%d %c %d",&a,&op,&b);
	if(op=='+'){
		printf("%d",a+b);}
	else if(op=='-'){printf("%d",a-b);}
	else if(op=='*'){printf("%d",a*b);}
	else if(op=='/'){printf("%d",a/b);}
	else {exit(0);}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'exit' was not declared in this scope
   12 |         else {exit(0);}
      |               ^~~~
a.cc:2:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
    1 | #include<stdio.h>
  +++ |+#include <cstdlib>
    2 | int main(void){
Language: C++

#include<iostream>
using namespace std;

int main(){
int a,b;
char op;

while(1){
cin >>a >>op >>b;
if(op=="?") break;

if(op=="+") cout <<a+b<<endl;
else if(op=="-") cout <<a-b<<endl;
else if(op=="*") cout <<a*b<<endl;
else if(op=="/") cout <<a/b<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | if(op=="?") break;
      |    ~~^~~~~
a.cc:12:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 | if(op=="+") cout <<a+b<<endl;
      |    ~~^~~~~
a.cc:13:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 | else if(op=="-") cout <<a-b<<endl;
      |         ~~^~~~~
a.cc:14:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 | else if(op=="*") cout <<a*b<<endl;
      |         ~~^~~~~
a.cc:15:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 | else if(op=="/") cout <<a/b<<endl;
      |         ~~^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int a,b;
 string op;
while(){
 cin >> a >> op >> b;
if( op == "+" ){
    cout << a + b << endl;
}else if( op == "-" ){
    cout << a - b << endl;
}else if( op == "*"){
    cout << a * b << endl;
}else if( op == "/"){
    cout << a / b << endl;
}else break;
}
 return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: expected primary-expression before ')' token
    6 | while(){
      |       ^
a.cc:18:11: error: expected '}' at end of input
   18 |  return 0;
      |           ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int a,b;
 string op;
while(1){
 cin >> a >> op >> b;
if( op == "+" ){
    cout << a + b << endl;
}else if( op == "-" ){
    cout << a - b << endl;
}else if( op == "*"){
    cout << a * b << endl;
}else if( op == "/"){
    cout << a / b << endl;
}else break;
}
 return 0;

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

#include <stdio.h>
 
int main(void){
int a,b;
char op;
while (1){
scanf("%d %c %d",&a,&op,&b);
if(op=="0"){
break;
}
else if(op=="+"){
printf("%d\n",a+b);
}
else if(op=="-"){
printf("%d\n",a-b);
}
else if(op=="*"){
printf("%d\n",a*b);
}
else if(op=="/"){
printf("%d\n",a/b);
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 | if(op=="0"){
      |    ~~^~~~~
a.cc:11:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 | else if(op=="+"){
      |         ~~^~~~~
a.cc:14:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 | else if(op=="-"){
      |         ~~^~~~~
a.cc:17:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 | else if(op=="*"){
      |         ~~^~~~~
a.cc:20:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 | else if(op=="/"){
      |         ~~^~~~~
Language: C++

#include<stdio.h>

int main (void){
int a,b;
    char c;
scanf("%d %c %d",&a,&c,&b);
    if(c=='+'){
        printf("%d\n",a+b);
    }
        else if(c=='-'){
        printf("%d\n",a-b);
    }
     else if(c=='*'){
        printf("%d\n",a*b);
    }
        else if(c=='/'){
        printf("%d\n",a/b);
    }
    else if(c=='?'){ printf(" ")

        
    }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:33: error: expected ';' before '}' token
   19 |     else if(c=='?'){ printf(" ")
      |                                 ^
      |                                 ;
......
   22 |     }
      |     ~