breaking the loop

vaibhav_89's Avatar
Go4Expert Member
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:
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
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Duplicate of breaking the loop posted as an article. Thread closed