Need to make a Looping Program

Hello, I was wondering if some of you people here could help me out with some code.

I want to create an endlessly looping program only stoppable by CTRL+C. Thing is, I don't remember enough about C++ from my little foray I had 2 years ago to do this. Something about loop() { code } or something, but it doesn't work.

What I want to loop is this system command: ping 192.168.1.2 /t /l 32768. I'm stress-testing a LAN server and I want to see what it can really take, even if it is something I picked up from a garage sale.
1
2
3
4
while( 1 )
{
   // Your code here
}
closed account (Dy7SLyTq)
i would just like to add on to what i hutch said while(1) is the c way because they didnt have built in bool types in c++ it is typically done as while(true), however i dont think it makes a difference because of type conversion. there is also for(;;)
Thanks for the replies.
Last edited on
Topic archived. No new replies allowed.