how to make a program repet

i need to know how to mak a program repet
unlimited.

do you have eny ideas?
1
2
3
4
5
6
7
int main()
{ 
  for(;;)
  {
    //your code here
  }
}
1
2
3
4
while(1)
{
 //your code here
}
thanks!


To make it simpler (in my opinion) use the define I show you in the below code, it's much easier to remember when looking back on the code and looks much less sloppy. However, either of the two codes above also work the same way.
1
2
3
4
5
6
7
8
9
10
#define EVER ;;

int main()
{
    for(EVER)
      {
          //Our code here will execute over and over FOREVER
      }
    return 0;
}
Last edited on
If you're unable to remember what while and for do, I think you might run into some serious trouble...
Topic archived. No new replies allowed.