B
Bern
lets say i have the code:
while (some condition){ /* the "big" loop */
.... some code....
while (some condition){
...code...
if (!some condition){
///// How to continue the "big" loop?
}
..some code....
}
...some code.....
}
Is there any other solution besides resorting to using goto?
Or is there a way to rearrange the whole structure to eliminate the use of 2
loops?
this situation in Java is not a problem as Java supports labeled breaks and
continue,
but why C/C++ doesn't support them?
I basically find it amusing--we are discouraged to use goto as a practice
of good progrtamming, but C++ does not provide support for such things in
programming.....
while (some condition){ /* the "big" loop */
.... some code....
while (some condition){
...code...
if (!some condition){
///// How to continue the "big" loop?
}
..some code....
}
...some code.....
}
Is there any other solution besides resorting to using goto?
Or is there a way to rearrange the whole structure to eliminate the use of 2
loops?
this situation in Java is not a problem as Java supports labeled breaks and
continue,
but why C/C++ doesn't support them?
I basically find it amusing--we are discouraged to use goto as a practice
of good progrtamming, but C++ does not provide support for such things in
programming.....