Mail Archives: djgpp/1997/08/26/09:18:56
In article <5telqi$1ue$1 AT news DOT kode DOT net>, ah897 AT detroit DOT freenet DOT org says...
>
>In article <01bcaa71$4c08c200$0d5e4ec2 AT xyy>, xyy AT infonie DOT be says...
>>
>>
>>Hi!
>>
>>
>>I still can't obtain truly random numbers with the srand(), random(), and
>>rand() functions, because, whatever the seed number i put in srand(), it is
>>_always the same results.
>>
In my Previous Post I demonstrated PSEUDO - CODE for a RANDOM Numbers Generator.
Here's the actual code. You can cut paste it and it'll run in Borland or DJGPP/ALLEGRO!
I just compiled it in RHIDE.
#include <dos.h>
main(){
int C;
struct time time_struct;
gettime(&time_struct);
C = time_struct.ti_hund;
printf("%d",time_struct.ti_hund);
}
That's all there is to it! 1 - 100 Random Number generator!
HEATHEN!!!
- Raw text -