This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
i have got a problem in using GSL random under BCB6!
- From: "zhuyan" <mite98 at mails dot tsinghua dot edu dot cn>
- To: "Gsl-Discuss" <gsl-discuss at sources dot redhat dot com>
- Date: Thu, 27 Mar 2003 23:19:24 +0800
- Subject: i have got a problem in using GSL random under BCB6!
here is my program
//---------------------------------------------------------------------------
#pragma hdrstop
//---------------------------------------------------------------------------
#include "stdio.h"
#include "conio.h"
#include "gsl/gsl_rng.h"
#include "gsl/gsl_randist.h"
#pragma argsused
int main(int argc, char* argv[])
{
double* out=new double[100];
const gsl_rng_type * T;
gsl_rng *r;
int i,j;
gsl_rng_env_setup();
T=gsl_rng_default;
r=gsl_rng_alloc(T);
for(i=0;i<100;i++){
out[i]=gsl_ran_gaussian(r,1);
}
gsl_rng_free(r);
}
//--------------------------------------------------------------------------
it can pass the compiling but when run it ,following problem occurs:
"Project project1.exe raised exception class EAccessViolatoin with message 'Access violation at address 10061FF6. Read of address 5070260B. Process stopped."
somthing seems wrong when i trace into the gsl_rng_alloc(T);
who can help me?is this is a bug?