I've tried googling an answer for my problem, but I cannot seem to find one.
Here's my very simple test code:
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main(void) {
char ch;
printf("Enter character: ");
ch = getch();
printf("%c", ch);
return 0;
}
When I try to run this in Eclipse, I can't even get the first printf line to show up, and performing any keypresses does nothing.
I've also tried doing fflush(stdout) and fflush(stdin), but the program does not as I want it to. If I try this on Visual Studio, it works perfectly.
Does anyone have an idea why? Thanks.