samedi 25 février 2017

How to use random() in C

So I am currently learning C, and i have some confusion about how the random() operator works. I know i have to provide a seed, but i don't know how to actually generate the random number.

srandom(seed);
long int value= random(40);

when I try this it gives me a compiler error: too many arguments to function ‘long int random()




Aucun commentaire:

Enregistrer un commentaire