I'm having trouble generating random values using gcc.
I've tried rand(), but it keeps giving me segmentation faults.
I did read that rand() is not advised in a multi-threading environment, and also somewhere else that the linux kernel could generate random numbers.
Anyone able to give me some advise on how to achieve this? This has always stumped me in C I dont really want to have to write my own (copy someone elses) generator, lol, I'd rather use an existing one
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Generating random values...
Generating random values...
Using rm -rvf * to remove old backups... lazy.
Realising you were in / as root ... priceless.
Realising you were in / as root ... priceless.
Code: Select all
/bin/bash echo $RANDOM
How are you calling it in C though.. I know that something along the lines of
Code: Select all
x = rand() % y;
Every cloud has a silver lining, except for the mushroom shaped ones, which have a lining of Strontium 90.
---------------------------------------------
umop apisdn
---------------------------------------------
umop apisdn