Tuesday, July 14, 2009

I'm trying to write a game program and have problems.?

Ok heres my deleima, I am tring to write a MUD with C++ and have a problem with random numbers. I want a random number not pseudorandom, between 1-100, what would be the best way to get a number in that range?

I'm trying to write a game program and have problems.?
You'll never get a truly random number from a computer, because everything in computers is generated by an algorithm. Pseudorandom numbers are, however, for all intents and purposes, random. For info on how to do what you are asking about, see this article: http://cplus.about.com/od/advancedtutori...


No comments:

Post a Comment