for example:
start:
Code:
for(..;..;..;) /*loop1*/
{....;
.....; /*now if i press any 'a' when loop 1 is excuting then it should go to loop 2
.....;
}
goto strat;
if(getch()=='a') /* loop 2*/
for (..;..;..)
...;
...;
..;
|
Go4Expert Member
|
|
| 24Oct2007,09:12 | #1 |
|
which function can i use in c/c++ so that as soon as i press a certain character then the loop breaks away goes into the next loop.
for example: start: Code:
for(..;..;..;) /*loop1*/
{....;
.....; /*now if i press any 'a' when loop 1 is excuting then it should go to loop 2
.....;
}
goto strat;
if(getch()=='a') /* loop 2*/
for (..;..;..)
...;
...;
..;
Last edited by shabbir; 24Oct2007 at 10:03.. Reason: Code block |
|
Go4Expert Founder
|
![]() |
| 24Oct2007,10:04 | #2 |
|
Duplicate of breaking the loop posted as an article. Thread closed
|