How to set random number generator to a range?

Is there a way I could make the range between -100 and 100 for random number generator? thanks

Last edited on
Yes. See http://www.cplusplus.com/reference/cstdlib/rand/

However, there is a modern replacement for rand() in C++11. See http://www.cplusplus.com/reference/random/
Topic archived. No new replies allowed.