1 Replies - 559 Views - Last Post: 02 July 2009 - 11:03 PM Rate Topic: -----

#1 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 464
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Recurs or using array of an class

Posted 02 July 2009 - 11:02 AM

exuse me for the question but what do you think is better to do a recurs function or use a arry of classes to avoid recurs i mean in treath of stack overlow to use the arry will it make any diference if i dinamicly change how many items the arry got

ty for your repleys
Is This A Good Question/Topic? 0
  • +

Replies To: Recurs or using array of an class

#2 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: Recurs or using array of an class

Posted 02 July 2009 - 11:03 PM

Well NoBrain, it really depends upon what you are doing. If you are doing a recursive function that searches a hard drive...

Well, you have to be careful on how you use recursion because if you code it (recursive dir) the wrong way then you will have problems with the stack but if you do it right. You should have no more functions on the stack than there are directories from the root to the deepest folder and thus you will avoid the stack overflow error.

As for whatever language you question is in, may I suggest that you proof read what you are writing and perhaps use a spell checker. Then don't forget that one of these guys will come around and harass you with that please post your code policy cut and paste thingy...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1