Thread
:
500!
View Single Post
Jun 24th, 2005, 10:11 AM
#
4
DaWei
Resident Grouch
Join Date: Jun 2005
Posts: 6,453
Rep Power:
10
Caveat: the recursive approach may use up your allotted stack before it uses up the memory you've alloted for the result. Most likely not for a factorial operation, though; the result grows rapidly, to indulge in an understatement.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner:
Grumpy on C++ Exceptions
DaWei on Pointers
DaWei
View Public Profile
Visit DaWei's homepage!
Find More Posts by DaWei