Why won't this compile? Answered
I am going by a book to teach me C programming, and I have entered the program exactly, but my compiler says there's an error. I know it is not an issue with the compiler/IDE because I tested it in another compiler and had the same result.
Here is the code:
int main (void)
printf("Enter your name and press <Enter>:\n");
fgets( buffer );
printf("\nYour name has %d characters and spaces!", strlen(buffer));
It says on line 8 (the one with fgets) that there are too few arguments, yet the book says it should compile correctly. The book is Sams Teach Yourself C Programming, and it is in lesson 2 exercise 5.
Thank you for any help!