Originally Posted by
Ad_robot
Thanks anduril, that example certainly works, though curses seems to make the rest of my program behave quite strangely. As I mentioned this is a modification to a large, exisiting bit of code.
I have put your curses example at the begining of my main loop (after removing the 'return 0', of course). I was hoping that afer exiting the while loop and calling endwin(), the rest of my code could run as before, using 'printf' to display strings to the user. However, it seems that I can only do this now by calling refresh, and even then this doesn't always work if a time delay is involved in generating the string (when polling a sensor for example). Worst of all is that my program now hangs occasionally and doesn't respond to Ctrl+C.