Prova così:
oppure:codice:int indice; char str[512]; /*"Svuota" stdin*/ while(!getchar()); for (indice=0;( str[indice]=getchar() )!='\n';indice++);
codice:int indice; char str[512]; /*"Svuota" stdin*/ fflush(stdin); for (indice=0;( str[indice]=getchar() )!='\n';indice++);

Rispondi quotando