You check the return value of [f]getc() and getchar() against EOF for failure, not NULL. And parentheses are a good idea around code like that.
Code:
unsigned char fgetc(FILE* stream);
It's int. You can't store EOF in a char, so don't even try.
So you want your program to do other things while it's waiting for the user to press a key?
There's no standard way to do that, but you'll find mention in the FAQ of kbhit() and getch() which might do the trick. I believe that both of those functions work with Dev-C++.
Code:
#include <conio.h>
int c = 0;
do {
if(kbhit()) {
c = getch();
printf("Received a key press: %c\n", c);
}
puts("Processing...");
} while(c != 27); /* 27, or 0x1B, is the code for ESCAPE */