Randomize Array – A Flexible hard-coded macro

Posted by on June 13, 2009

Tired of writing the same “randomize array” routines over and over?, just snap this little macro and register them as you see fit. A guard should be put to avoid double registrations (although the compiler will complain about this anyway — I suggest registering right after you include this, since you already know what you’re going to need… )



Simple, right?

A need for both a debug / format (to string) and random fills for string arrays is present, but I’m not in the need of them at the moment. Do request if you need them though.


1 comment on Randomize Array – A Flexible hard-coded macro


  1. admin says:

    I’ll add support for floats later, however it requires that I use a custom PRNG (it’s either that or hacking my way through the current PRNG…)

    Too bad theres no function overloading, it could come in handy on cases like this one for instance.