If you don't want an endless loop why did you write one into your program?
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
if I can break the second loop after running three loops it will work.
After the triple for loop put in the line break like for (i = 0; i < 3; ++i)
{
//do something
}
break;
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
int cnt = 0;
for infinite loop
{
//do stuff
if(//do stuff is what i need) // then break;
else cnt++;
//if cnt is above the limit then break;
}
firstPerson
Senior Poster
3,923 posts since Dec 2008
Reputation Points: 841
Solved Threads: 608