by "osmium" <r124c4u102@[EMAIL PROTECTED]
>
May 5, 2008 at 06:40 AM
<nkomli@[EMAIL PROTECTED]
> wrote:
>> Does anyone know where I can find a version of the ran3 random number
>> generator for C++ that will play nice on windows as a console app,
>> preferably something you can call simply with random1 =ran3() or
>> something similar.
>>
>> All the versions I found so far are implemented in different languages
>> or for some reason only work with Linux.
>>
>> Thanks
>
> Sorry, I forgot to mention that the ran3 generator algorithm is the
> one mentioned in the book Numerical recipes.
How about this?
http://www.cs.utah.edu/~tch/classes/cs4550/code/Numerical-Recipes/sources-used/
I changed the call to this:
float ran3(int* idum)
//int *idum;
and it seemed to work. Tested with DevC (in C++ mode) on a Windows
console
application.