Hi all,
My question is on GSL random number generator. I'm trying to use it on
my project.
It compiles but when it runs I get an access violation on command:
r = gsl_rng_alloc(T);
By the way: I use visual c++ .net.
Please, Help me!!!!!!!!!!!!
marco
This is my code:
#include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
#include <stdio.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
using namespace std;
int main()
{
const gsl_rng_type * T;
gsl_rng * r;
int i, n = 10;
gsl_rng_env_setup();
T = gsl_rng_default;
r = gsl_rng_alloc (T);
for (i = 0; i < n; i++)
{
double u = gsl_rng_uniform (r);
printf ("%.5f\n", u);
}
gsl_rng_free (r);
system("PAUSE");
delete Tempi ;
delete ZCB ;
return 0;
}
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl