Say I have the following:
and hit F5 to run it in Visual C++, if I force an EOF with CTRL-C it raises an exception. However if I run the program from the command line, it exits cleanly (although printing the ^C)Code:while ((ch = getchar()) != EOF) putchar(ch);
Why is this? Say I wanted to print a message after the EOF is reached, it won't get to that part in Visual C++ debug mode. I just get a "first chance exception" message.