Hello,
Problem lies not in the code you have shown but somewhere else, I feel. The code modified from what you have shown
prints the complaint I am stuck in an infinite loop every 5 seconds till I close the program manually.Code:do { cout << "I am stuck in an infinite loop" << endl; Sleep(5000); } while (1 == 1);
Just being curious: Why did you design it as an infinite loop?
Regards,
Pravin.




Reply With Quote