+ 1
How to terminate an infinite loop on getting an user interrupt?
I am beginner and I (because of you know, reasons) want to make an program running infinitely, that breaks when user press any key (don't tell me about ctrl+c thingie i want to make it so that it may be any interrupt key to break the loop) https://code.sololearn.com/co1ZDP87Mguj/?ref=app
1 Antwort
+ 1
Maybe like that :
#include <iostream>
using namespace std;
int main()
{
for(int x=0;x<=9999999999;x++)
{
if(x==1000){break;}
cout<<"*";
}
}