Hi,
I copied this code from the book but it won't compile. the error msg as mention above. I'm using DEV-C++ v.4.9.9.0.
#include <stdio.h>
char input[81], *ptr;
int main()
{
puts("enter text a line at a time, then press enter");
puts("put a blank line when done");
// loop as ong as input is not a blank line
while (*(ptr = gets(input)) != NULL)
printf("you entered %s\n", input);
puts("thank you and good-bye");
system("PAUSE");
return 0;
}
Thanks for any help.
I copied this code from the book but it won't compile. the error msg as mention above. I'm using DEV-C++ v.4.9.9.0.
#include <stdio.h>
char input[81], *ptr;
int main()
{
puts("enter text a line at a time, then press enter");
puts("put a blank line when done");
// loop as ong as input is not a blank line
while (*(ptr = gets(input)) != NULL)
printf("you entered %s\n", input);
puts("thank you and good-bye");
system("PAUSE");
return 0;
}
Thanks for any help.