| Author |
unreachible code detected
|
Branden Bobo
Greenhorn
Joined: Jul 16, 2012
Posts: 14
|
|
Can anybody tell me why the compiler tells me unreachible code detected in line: 12
I'm guessing it's detecting the inner loop as an infinite loop, but I can't figure out the logical error?
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
If I read that for-loop right, then it doesn't have a termination condition. So yes, I suppose the compiler might well observe that and classify it as an infinite loop.
|
 |
Branden Bobo
Greenhorn
Joined: Jul 16, 2012
Posts: 14
|
|
|
Thanks, I feel stupid, I've been staring at this method for 30min stumped by somethiing I should have know(seen).
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
Yup, I too have found that there's nothing like asking somebody else a question when you're suffering from that kind of blindness. That's what the Ranch is here for!
|
 |
 |
|
|
subject: unreachible code detected
|
|
|