How do you stop an infinite loop in C++?

Nguyễn Trà

New member
How do you stop an infinite loop in C++?
Answer
To stop your code going into infinite loop, you have to use either break statement or you can use the concept of exception handling using try,catch, throw etc. If suddenly you program runs in infinite loop, then use ctrl+pause/break.
 

Tìm kiếm

Back
Top