Hi, I am new to Visual Studio. My question is that I am trying to detect EOF in the console, but control+D doesnt seem to work...neither does control+D followed by <Enter>...i.e., with a small code snippet such as this:
#include <stdio.h>
main () {
long nc;
nc = 0;
while (getchar () != EOF)
++nc;
printf ("%ld", nc);
}
Could anyone help please?
Thank you,
Signed,
Forever Dumb
View the full article
#include <stdio.h>
main () {
long nc;
nc = 0;
while (getchar () != EOF)
++nc;
printf ("%ld", nc);
}
Could anyone help please?
Thank you,
Signed,
Forever Dumb
View the full article