I was reading the FAQ, "How do I get my program to wait for a key press"
If I understand the example correctly, (and please correct me if I'm wrong) the program gets input until it recives a newline when it then returns 0, but what about the section of code that says "ch != EOF'"
heres the example:
Beginner C programmer says:Code:#include <stdio.h> int main(void) { int ch; printf ("Press [Enter] to continue"); while ((ch = getchar()) != '\n' && ch != EOF); return(0); }
Thanks in advance