Language: C++

#define r return
#define a (int dx,int dy,int x,int y,char m,int c)
i,j,n,f[6];w[8]={1,1,0,-1,-1,-1,0,1};h[8]={0,1,1,1,0,-1,-1,-1};
char t[10][10],mark[2]={'o','x'};
int l a{if(t[x][y]=='.'||t[x][y]=='0')r 0;if(t[x][y]==m)r c;r l(dx,dy,x+dx,y+dy,m,c+1);}
int s a{int k,d;d=0;if(t[x][y]!='.')r 0;for(k=0;k<8;k++)d+=l(w[k],h[k],x+w[k],y+h[k],m,0);r d;}
int p a{if(t[x][y]=='0'||t[x][y]=='.')r 0;if(t[x][y]==m)r 1;if(p(dx,dy,x+dx,y+dy,m,0)){t[x][y]=m;r 1;}else r 0;}
int o a{int k;t[x][y]=m;for(k=0;k<8;k++)p(w[k],h[k],x+w[k],y+h[k],m,0);r 0;}
int main(){
  for(i=0;i<10;i++)t[0][i]=t[9][i]='0';
  for(i=1;i<9;i++){scanf("%s",&t[i][1]);t[i][0]='0';t[i][9]='0';}
  f[1]=-1;for(n=0;;n=(n+1)%2){f[n]=-1;
  for(i=n?8:1;n?i>-1:i<9;n?i--:i++)for(j=n?8:1;n?j>-1:j<9;n?j--:j++)f[n]<s(0,0,i,j,mark[n],0)?f[2+n]=i,f[4+n]=j,f[n]=s(0,0,i,j,mark[n],0):0;
    if(f[n]!=0)o(0,0,f[2+n],f[4+n],mark[n],0);
    if(f[0]==0&&f[1]==0)break;
  }
  for(i=1;i<9;i++){
    for(j=1;j<9;j++){
      printf("%c",t[i][j]);
    }
    puts("");
  }
  r 0;
}

Compiler output:
a.cc:3:1: error: 'i' does not name a type
    3 | i,j,n,f[6];w[8]={1,1,0,-1,-1,-1,0,1};h[8]={0,1,1,1,0,-1,-1,-1};
      | ^
a.cc:3:12: error: 'w' does not name a type
    3 | i,j,n,f[6];w[8]={1,1,0,-1,-1,-1,0,1};h[8]={0,1,1,1,0,-1,-1,-1};
      |            ^
a.cc:3:38: error: 'h' does not name a type
    3 | i,j,n,f[6];w[8]={1,1,0,-1,-1,-1,0,1};h[8]={0,1,1,1,0,-1,-1,-1};
      |                                      ^
a.cc: In function 'int s(int, int, int, int, char, int)':
a.cc:6:62: error: 'w' was not declared in this scope
    6 | int s a{int k,d;d=0;if(t[x][y]!='.')r 0;for(k=0;k<8;k++)d+=l(w[k],h[k],x+w[k],y+h[k],m,0);r d;}
      |                                                              ^
a.cc:6:67: error: 'h' was not declared in this scope
    6 | int s a{int k,d;d=0;if(t[x][y]!='.')r 0;for(k=0;k<8;k++)d+=l(w[k],h[k],x+w[k],y+h[k],m,0);r d;}
      |                                                                   ^
a.cc: In function 'int o(int, int, int, int, char, int)':
a.cc:8:43: error: 'w' was not declared in this scope
    8 | int o a{int k;t[x][y]=m;for(k=0;k<8;k++)p(w[k],h[k],x+w[k],y+h[k],m,0);r 0;}
      |                                           ^
a.cc:8:48: error: 'h' was not declared in this scope
    8 | int o a{int k;t[x][y]=m;for(k=0;k<8;k++)p(w[k],h[k],x+w[k],y+h[k],m,0);r 0;}
      |                                                ^
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0;i<10;i++)t[0][i]=t[9][i]='0';
      |       ^
a.cc:11:7: error: 'i' was not declared in this scope
   11 |   for(i=1;i<9;i++){scanf("%s",&t[i][1]);t[i][0]='0';t[i][9]='0';}
      |       ^
a.cc:11:20: error: 'scanf' was not declared in this scope
   11 |   for(i=1;i<9;i++){scanf("%s",&t[i][1]);t[i][0]='0';t[i][9]='0';}
      |                    ^~~~~
a.cc:12:3: error: 'f' was not declared in this scope
   12 |   f[1]=-1;for(n=0;;n=(n+1)%2){f[n]=-1;
      |   ^
a.cc:12:15: error: 'n' was not declared in this scope
   12 |   f[1]=-1;for(n=0;;n=(n+1)%2){f[n]=-1;
      |               ^
a.cc:13:7: error: 'i' was not declared in this scope
   13 |   for(i=n?8:1;n?i>-1:i<9;n?i--:i++)for(j=n?8:1;n?j>-1:j<9;n?j--:j++)f[n]<s(0,0,i,j,mark[n],0)?f[2+n]=i,f[4+n]=j,f[n]=s(0,0,i,j,mark[n],0):0;
      |       ^
a.cc:13:40: error: 'j' was not declared in this scope
   13 |   for(i=n?8:1;n?i>-1:i<9;n?i--:i++)for(j=n?8:1;n?j>-1:j<9;n?j--:j++)f[n]<s(0,0,i,j,mark[n],0)?f[2+n]=i,f[4+n]=j,f[n]=s(0,0,i,j,mark[n],0):0;
      |                                        ^
a.cc:17:7: error: 'i' was not declared in this scope
   17 |   for(i=1;i<9;i++){
      |       ^
a.cc:18:9: error: 'j' was not declared in this scope
   18 |     for(j=1;j<9;j++){
      |         ^
a.cc:19:7: error: 'printf' was not declared in this scope
   19 |       printf("%c",t[i][j]);
      |       ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define r return
a.cc:21:5: error: 'puts' was not declared in this scope
   21 |     puts("");
      |     ^~~~