Random Number

is there a simple line that i can do to make a random number?

i know in lua, there is the line math.random(-10, 10) which generates a random number with the range of -10 to 10, but is there one in C++?

Thanks for the help guys. :)
I love lua. It's got really simple syntax and arrays in lua (sometimes referred to as tables) are WAY better than C++'s arrays.
We will get a nice random number generator in the new C++0x Standard.
But until then :
int num = (std::rand() % (upper - lower + 1)) + lower;
Topic archived. No new replies allowed.