I wrote a function that generates 10 000 times a pair of different random numbers,
but somethimes i got bus errors.
(with out compiling twice, sometimes bus error, sometimes ok.... )
is the first time I got that time of errors..., it only appears sometimes, not always.
Does it have any relation with the number of iterations??
or something with time.h? or srand()? or rand?
here is part of my function.
does it make any change if i put srand inside the for loop?
unsigned long int iter=10000;
int seg1, seg2;
srand((unsigned int)time((time_t *)NULL));
/*make calculations... */
thanks in advance.