Ciao a tutti.
Qualcuno è in grado di spiegarmi gli errori (vedi commento in neretto vicino alla relativa riga nella funzione stampaParole nella prima parte del codice qui sotto) di questo codice? A me sembra tutto giusto e coerente. Ho usato DevC++ 4.9.9.2.

codice:
#include <stdlib.h>
#include <stdio.h>
#define N 20
#define M 20

typedef struct {
               int num;
	       char car;
} Elem;


typedef Elem Cruciverba[N][M];

void stampaParole(Cruciverba c, int dimr, int dimc)
{
 int i,j,k;
 for(i=0;i<dimr;i++) 
   for(j=0;j<dimc;j++)
     if(c[i][j].num>0)
       {
        if(j!=dimc-1 && c[i][j+1].num!=-1 && (j==0 || c[i][j-1].num==-1))) /* stampa EVENTUALE parola orizzontale se è lunga >1 */ SYNTAX ERRORE BEFORE ')' token 
          {
           k=j;
           while(j!=dimc-1 && c[i][j+1].num!=-1)
              {
               printf("%c",c[i][k].car);
               k++;
              }
          }
        if(i!=dimr-1 && c[i+1][j].num!=-1 && (i==0 || c[i-1][j].num==-1))) /* stampa EVENTUALE parola verticale se è lunga >1 */ SYNTAX ERRORE BEFORE ')' token 
          {
           k=i;
           while(i!=dimr-1 && c[i+1][j].num!=-1)
              {
               printf("%c",c[k][j].car);               
               k++;
              }            
          }
        printf("\n");vedi lista di errori dopo il codice,ho provato anche con printf("%c",'\n')
       }   
}

Elem ctor_Elem(int num,char car)
{
 Elem e;
 e.num=num;
 e.car=car;
 return e;
}


void stampa_cruciverba(Cruciverba cr,int dimr,int dimc)
{
 int r,c;
 printf("CRUCIVERBA STAMPATO:\n\n");
 for (r=0;r<dimr;++r)
    {
     for (c=0;c<dimc;++c)
        if (cr[r][c].num!=-1)
            if (cr[r][c].num!=0)
                 printf("%d%c\t",cr[r][c].num,cr[r][c].car);
            else printf("%c\t",cr[r][c].car);
        else printf("+\t");
     printf("\n");
    }
 printf("_______________________________________________________\n");
}



int main()
{
 Cruciverba c;
 char voc;
 int dimr=8,dimc=8;
 c[0][0]=ctor_Elem(-1,0);c[0][1]=ctor_Elem(1,'s');  c[0][2]=ctor_Elem(2,'c');c[0][3]=ctor_Elem(0,'u');  c[0][4]=ctor_Elem(3,'o');c[0][5]=ctor_Elem(0,'l');  c[0][6]=ctor_Elem(4,'a');c[0][7]=ctor_Elem(-1,0);
 c[1][0]=ctor_Elem(5,'o');c[1][1]=ctor_Elem(-1,0);  c[1][2]=ctor_Elem(0,'e');c[1][3]=ctor_Elem(-1,0);   c[1][4]=ctor_Elem(0,'h');c[1][5]=ctor_Elem(-1,0);   c[1][6]=ctor_Elem(0,'s');c[1][7]=ctor_Elem(-1,0);
 c[2][0]=ctor_Elem(6,'f');c[2][1]=ctor_Elem(7,'s'); c[2][2]=ctor_Elem(-1,0);c[2][3]=ctor_Elem(8,'h');   c[2][4]=ctor_Elem(-1,0);c[2][5]=ctor_Elem(9,'p');   c[2][6]=ctor_Elem(0,'o');c[2][7]=ctor_Elem(10,'p');
 c[3][0]=ctor_Elem(11,'f');c[3][1]=ctor_Elem(0,'a');c[3][2]=ctor_Elem(0,'m');c[3][3]=ctor_Elem(0,'i');  c[3][4]=ctor_Elem(12,'g');c[3][5]=ctor_Elem(0,'l'); c[3][6]=ctor_Elem(0,'i');c[3][7]=ctor_Elem(0,'a');
 c[4][0]=ctor_Elem(-1,0);c[4][1]=ctor_Elem(0,'l');  c[4][2]=ctor_Elem(-1,0);c[4][3]=ctor_Elem(13,'p');  c[4][4]=ctor_Elem(0,'i');c[4][5]=ctor_Elem(0,'u');  c[4][6]=ctor_Elem(-1,0);c[4][7]=ctor_Elem(0,'r');
 c[5][0]=ctor_Elem(14,'b');c[5][1]=ctor_Elem(0,'u');c[5][2]=ctor_Elem(-1,0);c[5][3]=ctor_Elem(-1,0);    c[5][4]=ctor_Elem(15,'o');c[5][5]=ctor_Elem(0,'t'); c[5][6]=ctor_Elem(0,'t');c[5][7]=ctor_Elem(0,'o');
 c[6][0]=ctor_Elem(-1,0);c[6][1]=ctor_Elem(16,'t'); c[6][2]=ctor_Elem(17,'a');c[6][3]=ctor_Elem(18,'c');c[6][4]=ctor_Elem(0,'c');c[6][5]=ctor_Elem(0,'o');  c[6][6]=ctor_Elem(-1,0);c[6][7]=ctor_Elem(0,'l');
 c[7][0]=ctor_Elem(19,'a');c[7][1]=ctor_Elem(0,'e');c[7][2]=ctor_Elem(0,'r');c[7][3]=ctor_Elem(0,'e');  c[7][4]=ctor_Elem(0,'o');c[7][5]=ctor_Elem(-1,0);   c[7][6]=ctor_Elem(20,'l');c[7][7]=ctor_Elem(0,'a');
 stampa_cruciverba(c,dimr,dimc);
 voc=vocale(c,dimr,dimc);
 printf("LISTA PAROLE:\n\n\n");
 stampaParole(c,dimr,dimc);
 system("PAUSE"); // solo per DevCPP in ambiente WINDOWS
 return 0;
}
Errori printf(funzione stampaParole):
- syntax error before string constant
- conflicting types for 'printf'
- parameter list with an ellipsis can't match an empty parameter name list declaration
- conflicting types for 'printf'
- parameter list with an ellipsis can't match an empty parameter name list declaration
- [Warning] data definition has no type or storage class
Grazie in anticipo