Alternatives to multilevel breaks include single breaks, together with a state variable which is tested to break out another level; exceptions, which are caught at the level being broken out to; placing the nested loops in a function and using return to effect termination of the entire nested loop; or using a label and a goto statement.
32.
Alternatives to multilevel breaks include single breaks, together with a state variable which is tested to break out another level; exceptions, which are caught at the level being broken out to; placing the nested loops in a function and using return to effect termination of the entire nested loop; or using a label and a goto statement.
33.
Then I independently tried three different ways of speeding it up . ( 1 ) I converted it to C, using calls like printf ( " % c ", charset [ indexes [ i ] ] ) and in place of cout . ( 1A ) In the C version, I replaced the printf calls with putchar . ( 2 ) I moved the strlen ( ) call, which always returns the same value, out of the nested loop.