Results 1 to 2 of 2

Thread: How to make random generated numbers?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Just call srand() with some timestamp first:

    Code:
    #include <time.h>
    
    
    
    srand ( time(NULL) );
    srand() is "mixing" the numbers, so they wont be the same next start.
    timescale 0.01

  2. The Following User Says Thank You to kung foo man For This Useful Post:

    EvoloZz (15th December 2012)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •