bueno, pues casi he terminado mi 3 en raya:
    
Código C:
Ver original- #include <stdio.h> 
- #define fila 2 
- #define columna 2 
-   
- // "1" es el jugador humano, "2" el ordenador, "0" significa que esta vacia 
-   
- int tablero [fila][columna], turno, jugadas=0; 
-   
- int jugada_maquina() //pone la ficha del ordenador en un lugar cualquiera, intentando que sea la mejor posicion 
- { 
-     if (tablero [1][1]!= 0) 
-   
-     { 
-        tablero [1][1]=2 
-   
-     } 
-   
-     else if (tablero [1][0]!= 0|| tablero [1][2]!= 0|| tablero [0][1]!= 0|| tablero [2][1]!= 0) 
-   
-     { 
-      
-        tablero [1][0]=2 
-   
-     } 
-      
-     else if(tablero[0][0]!= 0 ||tablero [0][2]!= 0|| tablero[2][0]!= 0|| tablero [2][2]!= 0) 
-   
-     { 
-   
-        tablero [2][2]=2 
-   
-     } 
-   
-     return 0; 
- } 
-   
- //Inicializar el tablero todo blanco 
-   
- void inicia_tablero() 
- { 
-     int i, j; 
-   
-     for(i=0; i<3; i++) 
-         for(j=0; j<3; j++) tablero[i] [j] = 0 ; 
- } 
-   
-   
- int jugada_valida(int f, int d) // comprueba si lo que se quiere hacer es valido o no 
- { 
-   
-      if(f<=3 && d<=3 && tablero[f][d]== 0) 
-      return 1; // jugada valida 
-   else 
-      return 0; // jugada invalida 
- } 
-   
- void jugada_usuario(int f, int d) 
- { 
-   
-     if(jugada_valida(f,d)==1) 
-       tablero[f][d]=1; 
- } 
-   
- void imprimir() 
- { 
-   
-  for(int i=0;i<3;i++) 
-          
-         { 
-   
-   
-   for(int j=0;j<3;j++) 
-   
-     { 
-   
-   
-         } 
-     } 
- } 
-   
-   
- int ganar_perder_empatar(); 
-   
- int resultado, i; // tiene 0 si gana, 1 si pierde 
-   
- int conF1,conC1,conD1=0,conOD1=0; 
- int conF2,conC2,conD2=0,conOD2=0; 
-   
-   
-   
-   
-   for(i=0;i<3;i++) 
-   
- { 
-     conF1=conC1=conF2=conC2=0; 
-      
-   
-     { 
-   
-         if(tablero[i][j]==1) 
-           conF1++; 
-         if(tablero[j][i]==1) 
-          conC1++; 
-         if(i==j && tablero[i][j]==1) 
-           conD1++; 
-         if(i+j==2 && tablero[i][j]==1) 
-           conOD1++; 
-   
-   
-         if(tablero[i][j]==2) 
-           conF2++; 
-         if(tablero[j][i]==2) 
-          conC2++; 
-         if(i==j && tablero[i][j]==2) 
-          conD2++; 
-         if(i+j==2 && tablero[i][j]==2) 
-          conOD2++; 
-      
-     } 
-   
- if(conF1==3 || conC1==3 || conD1==3 || conF2==3 || conC2==3 || conD2==3 || conOD1==3 || conOD2==3) 
-        
-  resultado=0; 
-    
- } 
-   
- if(jugadas==9) 
-   
-     return 0; 
-   
- else if (resultado==0 && turno==1) 
-   
-     return 1; 
-   
- else if(resultado==0 && turno==2) 
-   
-     return 2; 
-   
- else 
-     return -1; 
-   
- } 
-   
-   
-   
- int main() 
- { 
- int f, c; 
-   
- printf("elije quien empieza: 1. tu 2. cpu \n"); 
-      
-   
-   
-   
- inicia_tablero(); 
-   
- do 
- { 
-   
- jugadas++; 
-      
- if(turno==1) 
- { 
- do 
- { 
-   
-     printf("ingresa la posicion: "); 
-   
-      if(jugada_valida(f,c)==0) 
-     { 
-          
-   
-     } 
-   
- while(jugada_valida(f, c)==0); 
- } 
- jugada_usuario(f, c); 
-   
-     jugada_maquina(); 
-   
-   
-     else if(turno==2){ 
-      jugada_maquina(); 
-     } 
-      imprimir(); 
-   
-   
-   
-   
-       if(ganar_perder_empatar()==1) 
-       else{ 
-         if(ganar_perder_empatar()==2) 
-         else 
-          if(ganar_perder_empatar()==0) 
-           printf("\n\nPartida Empatada\n"); 
-       } 
-   
- if(turno==1) 
-       turno=2; 
-     else 
-       turno=1; 
-   
- while(ganar_perder_empatar()==-1); 
-  printf("\n\nPulsa una tecla para salir...\n"); 
-  return 0; 
-   
- } 
 lo he compilado y me da estos errores: 
codigo.cpp: In function `int jugada_maquina()':
codigo.cpp:16: error: syntax error before `}' token
codigo.cpp:24: error: syntax error before `}' token
codigo.cpp:32: error: syntax error before `}' token
codigo.cpp: At global scope:
codigo.cpp:94: error: syntax error before `for'
codigo.cpp:94: error: syntax error before `;' token
codigo.cpp:94: error: syntax error before `++' token
codigo.cpp: In function `int main()':
codigo.cpp:182: error: syntax error before `(' token
codigo.cpp:187: error: syntax error before `else'
codigo.cpp:220: error: syntax error before `if'
codigo.cpp: In function `int main()':
codigo.cpp:240: error: redefinition of `int main()'
codigo.cpp:149: error: `int main()' previously defined here
codigo.cpp:273: error: syntax error before `(' token
codigo.cpp:278: error: syntax error before `else'
codigo.cpp:310: error: syntax error at end of input 
codigo.o - 14 error(s), 0 warning(s)  
pero no se cuales son 
¿una ultima ayudita? 
         gracias