You can't just replace all occurances of "gets" with "fgets" in your code. (The errors are because fgets takes an extra parameter.) Try this:
Note that s must be an array and you must have included <string.h>.
char s[SOMETHING], *p;
fgets(s, sizeof(s), stdin);
if((p = strchr(s, '\n'))) *p = 0;
thanks for you help guys
thank you guys this forum Rocks!
I am assuming gets reads standard input so you need to
tell fgets that so...par example
Basically you are telling fgets which file to read.