|
-
July 27th, 2010, 11:03 AM
#6
Re: why is it skipping lines?
 Originally Posted by CyberShot
The strange thing is that the code works just fine if I put it in a while loop.
The code you did post does the following:
selection calls addchecksum, which calls selection, which calls addchecksum, which calls selection, which calls addchecksum ...
A few of these, and your stack space gets exhausted. Imagine if your program was supposed to be run non-stop.
There is no need for recursion in such a simple program. So when you say "while loop", are you referring to the code you posted or different code?
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|