[b][red]This message was edited by day9981 at 2007-1-9 22:47:14[/red][/b][hr]
[b][red]This message was edited by day9981 at 2007-1-9 22:46:28[/red][/b][hr]
No problem, I know prssing Ctrl+Z generates EOF in Windows, and pressing Ctrl+D generates EOF in Unix/Linux. Problem was it doesn`t always work in Windows command line, or i should say NEVER, when you press Ctrl+Z. No way to do so, like in the following program.#include
printf ("What is your name?
scanf( "%s", name ); // gets(name); also fails
if (name == NULL)
printf( "See you.
printf( "Hello, %s.
", name );
gets returns a NULL when it meets an EOF and no input entered. I want to see "See you." in the above program.
However, I tried it in Pelles C, VC, TC/C++, no way, no way to generate an EOF by pressing Ctrl+Z. Can anyone tell me how to?