Re: Algorithm for Random numbers (with certain numbers with higher priority)
Just to add: This site has a related FAQ: http://www.codeguru.com/forum/showthread.php?t=378879. I think the code from the first two posts can be easily adapted to your needs by basically replacing the call to the distribution function with a table lookup.
Also, if you happen to use C++0b, the facilities from the <random> header perhaps are useful. I think particularly the discrete_distribution class looks interesting.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.