May 21, 2012 at 1:18pm UTC
getchar() reads one char.
Last edited on May 21, 2012 at 1:18pm UTC
May 21, 2012 at 1:21pm UTC
mmm.. i'm sorry
what do you mean..
sorry...
May 21, 2012 at 1:23pm UTC
That means that getchar() removes the first character and gets() gets the rest. So the first character is gone (like observed)
May 21, 2012 at 1:34pm UTC
owww...
so, what i can do?
i want make that program...
what the solution?
please help me.. this is for my project in school..
oh...i'm forgot, why getchar() remove first char form gets?
thanks for answer...:)
May 22, 2012 at 12:42am UTC
Wait. gets attaches a \n character by itself. You can comment the fputs("\n",files) line.
EDIT: Or was it the getline? Check the References Section eventually.
Last edited on May 22, 2012 at 12:43am UTC
May 22, 2012 at 1:00am UTC
i try to commnet the fputs("\n", file)
but the gets not attach a "\n" char by itself