I have a problem. I have a program that will run continuously. But I want to have an interupt to stop the program. How do I do it??

I tried use getch but this will cause the program to pause at getch until a key is hit (which is not what I want). I want it to continue running until a key is hit before it stops.

My program consist of a for loop which does the continuous running.

I am using Borland C++ to compile and run my program.