Mail Archives: djgpp/2000/07/02/19:31:37.1
radsmail AT juno DOT com (Radical NetSurfer) wrote in
<go9tls4tdiruq2kv68c5m6f0otoerndr1a AT 4ax DOT com>:
>OK! enough is quite enough for Crying Out Loud!
interesting attitude you have. as i mentioned before, basic c questions
belong in comp.lang.c or comp.lang.c.moderated.
here is a list of mistakes (not necessarily exhaustive) in your original
code:
* declaration of trnd is not legal in C
* undeclared variable: Rseed
* you don't return a value from main.
you can try:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(int argc, char** argv) {
time_t trnd;
int retv = 0; /* return value from functions */
time(&trnd);
srand((unsigned) trnd);
/*[snip]*/
return retv;
}
incidentally, you should at least type
info libc alpha time at the command line, and read what it does.
>OK! How is this a Compiler ERROR ?!!?!?!!?!?!?!?!!?!?!?
>
>sheesh! and golly g-willikurs!
>
>Always delighted to get (intelligent) Email:
>radsmail AT juno DOT com
>http://members.tripod.com/~RadSurfer/
There are four sorts of men:
He who knows not and knows not he knows not: he is a fool - shun him.
He who knows not and knows he knows not: he is simple - teach him.
He who knows and knows not he knows: he is asleep - wake him.
He who knows and knows he knows: he is wise - follow him.
Arabian Proverb
(Taken from "Reasoning About Knowledge" by Fagin. Halpern, Moses, and
Vardi: see http://www.cs.cornell.edu/home/halpern/rak.html)
you can also go to yahoo and search for online IQ tests if you really feel
so superior.
Sinan.
--
--------------------------------
A. Sinan Unur
http://www.unur.com/
- Raw text -