I wondering how to stop a endless loop.
The program clears a file then opens it and refreshes it over and over(the file is going to be modified by another program).
I want it to start from the beginning anytime i press enter or escape, it doesn't really matter as long as you can restart it.
I don't think there is a simple platform independent way of doing this. You will have to try a library like curses, or maybe use the signals mechanism available on linux.