|
-
Oct 17th, 2003, 10:57 AM
#1
Thread Starter
Registered User
increase the stack size
i am using recursion to fill a polygon by checking one pixel at a time, so if the polygon is 100 x 100 pixels on the screen, then the procedure will call itself a maximum of 10000 times. Every time I get a stack overflow. If you want, i can send you the recursive function, but i don't think there is a problem with it, as it has worked based on the same principle in c++. Basically, how can i increase the amount of stack space available for my program?
thanks in advance.
-
Oct 17th, 2003, 12:27 PM
#2
yay gay
hmmmmmm..err but dont u think that call a function 10 000 times is a little too much? why dont you just make a big loop? i bet you won't get any stack problems with it..
also are u opening in each instance of the function a new picture?
\m/  \m/
-
Oct 18th, 2003, 07:07 PM
#3
Lively Member
Yes, loop. Calling a function 10,000 times is gonna make you 20 dollars less. hehe...... LOOP = 10,000 = "Rather have the money"
DannyJoumaa
Advanced VB6 Programmer
Intermediate-Advanced VB .NET Programmer
Intermediate C# Programmer
Intermediate Win32 Developer
Beginner Mac OS X Developer
Contact: [email protected]
Favorite Sayings:
"Every time you open your mouth, you prove your an idiot."
"God is a programmer. Satan is a bug. Life is debugging."
-
Oct 22nd, 2003, 09:16 PM
#4
Thread Starter
Registered User
i think that in my case i have to use recursion, since there is no better algorithm. so, before i give up on my problem, is it at all possible to increase the stack size?
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
|