i have big problem rand()

Pages: 12
Looks like your compiler is a major annoyance. I'd just disable that particular warning (if possible), but instead you can explicitly cast to the desired type:
srand((unsigned int)time(0));

Edit: too slow.
Last edited on
srand( time( 0U ) );

does the trick without the cast.


Really? I thought the problem was because time() returns a time_t and not an unsigned int?
Topic archived. No new replies allowed.
Pages: 12