My Visual Studio still awaits input even after I keep entering a newline.
For example:
while ((c = fgetc(stdin)) != EOF)
{
// do something
}
What should I enter that sends EOF to Visual Studio?
My Visual Studio still awaits input even after I keep entering a newline.
For example:
while ((c = fgetc(stdin)) != EOF)
{
// do something
}
What should I enter that sends EOF to Visual Studio?
You can send an EOF with CTRL+D (for Linux) or CTRL+Z (for Windows) systems.
To elaborate, when fgetc() is waiting for an input from empty stdin, this key combination will simulate the EOF. In case, the stdin is not empty, you have to use the key combination twice (once to help flush the stdin, another to actually send the EOF).