[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] GSL random number & visual c++ .net

From: Marco Ottolino
Subject: [Help-gsl] GSL random number & visual c++ .net
Date: Wed, 3 May 2006 18:57:07 +0200

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!!!!!!!!!!!!
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;
       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);
 delete Tempi ;
 delete ZCB ;
 return 0;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]