Ciao a tutti, sempre io immerso nel C...vi posto questo mio piccolo programmino...perchè mi restituisce 2 warnings il compilatore? Il programma gira e funziona...grazie mille:
#include <stdio.h>
#include <ctype.h>
#define SIZE 51
int main ()
{ char string [SIZE];
int i, lun;
printf ("Inserire una frase di massimo 50 caratteri:\n");
gets (string);
lun = (strlen (string));
for (i=0; i<lun; i++)
printf ("%c", toupper (string[i]));
printf ("\n");
return 0;
}
...i warnings sono:
toupper.c:13: warning: implicit declaration of function ‘strlen’
toupper.c:13: warning: incompatible implicit declaration of built-in function ‘strlen’
...inoltre, ogni volta che uso gets il compilatore mi scrive:
warning: the `gets' function is dangerous and should not be used. Ma perchè è pericoloso il suo uso e non dovrei usarla?Grazie mille ancora...