I am trying to do something like this
#include <conio.h>
#inlcude <iostream>
void getInput(){
//while no input is given..
while(!_getch()){
printf("no input");
}
//as soon as input is given ('a', '1',...)
printf("Input detected!");
}
i want to print "no input" over and over exept for when a key is pressed(then it should print "input detected")
but with this code it does not work because it will stop at _getch() and wait for input. how can i skip this part or how can i tell the while loop there was no input?
thank you :)