How can I stop the loop when user enter ESC? When user enters ESC, the program prompts user for entering Y/N, if Y, stops the loop, otherwise, the loop continue.
Because these many sub-programs involves a lot of computations and cannot stop or wait for user's input.Code:int i = 0; do { i++; // many sub-programs follow, e.g. fun1(); fun2(); fun3(); ......... fun10(); } while(i < 2000); // for example 2000
Useless the user press ESC, the loop should be continued to run.
I have no ideas of it.
Can anyone answer me?