How can I generate a random number within range 0 to n where n can be > RAND_MAX in c,c++?
Thanks.
Random numbers is a very specialized subject that unless you are a maths junky is very easy to get wrong. So I would advice against building a random number from multiple sources you should use a good library.
I would first look at boost::Random
If that is not suffecient try of this group sci.crypt.random-numbers Ask the question there they should be able to help.