Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>randomize() initialize random number generator (macro)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 randomize()             Initialize Random Number Generator (Macro)

 #include <stdlib.h>

 void       randomize(void);

    randomize() initializes the random number generator. It is
    recommended that <time.h> be included when using the random number
    generator, as randomize() calls the time() function.

       Returns:     Nothing.

   -------------------------------- Example ---------------------------------

 The following statements initialize the random number generator and print a
 random number.

           #include <stdlib.h>
           #include <time.h>

           main()
           {
               randomize();
               printf("%d ",random(100));
           }


See Also: rand() random()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson