fact(100) is rather a large number - bigger than what a double can handle, and certainly bigger than an unsigned 64 bit quantity, so you need an extended number library like gmp (there are others) - have a look at boost library.
Please always use code tags - use the <> button on the format menu, when editing your topic.
And can we ask you not to do duplicate posts, just keep the same one going. If you don't get replies, then reply to your own topic, and it will turn up at the top of the list again. If you think it is on the wrong board, then you can edit your post, and move it to a different one.
100! is a very big number, chances are your architecture's "unsigned long" data type is not big enough to hold it. In fact, I doubt any built-in types will be big enough.
I would search for a "BigNumber" C++ library on google, or come up with your own custom arithmetic that works on a large array or dynamic string.