If I want to loop until a keystroke there is a quite nice Windows solution:
while(!kbhit()){
//...
}
But this is neither an ISO-Function nor works on other Operating Systems except MS Win. I found other cross-plattform solutions but they are quite confusing and bloated - isn't there another easy way to manage this?
You can use the next version of kbhit() for *nix OSes: