Originally Posted by pr1nc3k1d
Did you try the code ? It's working fine ( no overflow ) but it's also limited. I didn't say that it's not. I wanted to write a code which calculates the factorial of 1000 but it's also working for greater values. The vector can hold a result with more than 10.000 digits , but it's limited.

First i told you to store in vector too much overhead and second thing storing has some limit!!! But you know today In Statistical Software factorial of very big number is required. So on that case, By any way you have to go for sterling Approximation formula.