I have this piece of code for instance:
while(true){
printf("looping");
getch();
}
Instead of waiting for user input on each loop, the loop just continues without me; printing
loop
loop
loop
until I close the program.
Is there a better way to read a single character ? All i really want to do is to have the user input a 'y' or a 'n'