Once, my teacher taught me to use randomize()
and random()
function for generating pseudorandom numbers in C++ Builder. Now I prefer working in VS
Although there are (obviously, above) people who will assert with religious fervor that rand() is bad and random() is not, it turns out that your mileage may vary. Here's the gcc answer to the question of "What's the difference...", as supplied by the gcc version of stdlib.h (emphasis added):
/* These are the functions that actually do things. The random',
srandom',
initstate' and
setstate' functions are those from BSD Unices.
The rand' and
srand' functions are required by the ANSI standard.
We provide both interfaces to the same random number generator. /
/ Return a random long integer between 0 and RAND_MAX inclusive. */