[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: C++ Q
From: Andreas Beckermann <b_mann () gmx ! de>
Date: 2000-07-10 21:25:40
[Download RAW message or body]
Am Mon, 10 Jul 2000 schrieb Thomas Zander:
> What is this suppost to do?
>
> int i, j;
> for (i=0; i<10; i++) {
> for (j = 0; j<10 j++) {
> if ( i == j ) continue;
> do something
> }
> }
>
> Apperently the "do something" is never reached. it gets stuck on the
> continue statement which it never leaves. (when 0 == 0 )
>
> Is this a bug somewhere, or am I ignorant in C++
>
> Thanx for any reply.
>
> --
> Thomas Zander zander@earthling.net
> The only thing worse than failure is the fear of trying something new
>
Try it yourself:
int i, j;
for (i=0; i<10; i++) {
for (j = 0; j<10; j++) {
if ( i == j ) continue;
printf("i=%d j=%d\n", i, j);
}
}
When ( i == j ) the second loop is left.
The first is untouched.
CU
Andreas
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic