well, in the math library...
There are the functions srand(int) and rand(). These are best for beginners to use. Something like (in main.cpp)
Code:
// up at top
#include <math.h>
// down in function
// seed the random number generator
srand(YOURSEEDHERE);
// then to get your random number
myrandvariable = (rand() % 100) + 1;
This is not a cryptographically secure random number generator but it works. Usually is best to seed the random number with a time value. If you are asking how to write your own random number generator, that is different and will explode this thread into a heated debate on definitions of "cryptographically secure" and "statistically random".