Language: C++

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

int main() {
	string a;
	while(cin >> a){
		if(a[0] == a[1] && a[0] == a[2] && a[0] != "s"){
			if(a[0] == "o")
				cout << "o" << endl;
			if(a[0] == "x")
				cout << "x" << endl;
		}else if(a[3] == a[4] && a[3] == a[5] && a[3] != "s"){
			if(a[3] == "o")
				cout << "o" << endl;
			if(a[3] == "x")
				cout << "x" << endl;
		}else if(a[6] == a[7] && a[8] == a[7] && a[8] != "s"){
			if(a[6] == "o")
				cout << "o" << endl;
			if(a[6] == "x")
				cout << "x" << endl;
		}else if(a[0] == a[3] && a[0] == a[6] && a[0] != "s"){
			if(a[0] == "o")
				cout << "o" << endl;
			if(a[0] == "x")
				cout << "x" << endl;
		}else if(a[1] == a[4] && a[7] == a[4] && a[4] != "s"){
			if(a[4] == "o")
				cout << "o" << endl;
			if(a[4] == "x")
				cout << "x" << endl;
		}else if(a[2] == a[5] && a[8] == a[5] && a[5] != "s"){
			if(a[2] == "o")
				cout << "o" << endl;
			if(a[2] == "x")
				cout << "x" << endl;
		}else if(a[0] == a[4] && a[8] == a[4] && a[0] != "s"){
			if(a[0] == "o")
				cout << "o" << endl;
			if(a[0] == "x")
				cout << "x" << endl;
		}else if(a[2] == a[4] && a[6] == a[4] && a[4] != "s"){
			if(a[4] == "o")
				cout << "o" << endl;
			if(a[4] == "x")
				cout << "x" << endl;
		}else{
			cout << "d" << endl;
		}

		
	}
	

	return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:8:57: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |                 if(a[0] == a[1] && a[0] == a[2] && a[0] != "s"){
a.cc:9:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |                         if(a[0] == "o")
a.cc:11:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |                         if(a[0] == "x")
a.cc:13:63: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |                 }else if(a[3] == a[4] && a[3] == a[5] && a[3] != "s"){
a.cc:14:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                         if(a[3] == "o")
a.cc:16:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |                         if(a[3] == "x")
a.cc:18:63: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                 }else if(a[6] == a[7] && a[8] == a[7] && a[8] != "s"){
a.cc:19:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |                         if(a[6] == "o")
a.cc:21:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |                         if(a[6] == "x")
a.cc:23:63: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |                 }else if(a[0] == a[3] && a[0] == a[6] && a[0] != "s"){
a.cc:24:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |                         if(a[0] == "o")
a.cc:26:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |                         if(a[0] == "x")
a.cc:28:63: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |                 }else if(a[1] == a[4] && a[7] == a[4] && a[4] != "s"){
a.cc:29:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   29 |                         if(a[4] == "o")
a.cc:31:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |                         if(a[4] == "x")
a.cc:33:63: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   33 |                 }else if(a[2] == a[5] && a[8] == a[5] && a[5] != "s"){
a.cc:34:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   34 |                         if(a[2] == "o")
a.cc:36:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   36 |                         if(a[2] == "x")
a.cc:38:63: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   38 |                 }else if(a[0] == a[4] && a[8] == a[4] && a[0] != "s"){
a.cc:39:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   39 |                         if(a[0] == "o")
a.cc:41:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   41 |                         if(a[0] == "x")
a.cc:43:63: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   43 |                 }else if(a[2] == a[4] && a[6] == a[4] && a[4] != "s"){
a.cc:44:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   44 |                         if(a[4] == "o")
a.cc:46:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   46 |                         if(a[4] == "x")