i have got a problem in using GSL random under BCB6!
zhuyan
mite98@mails.tsinghua.edu.cn
Fri Mar 28 18:26:00 GMT 2003
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?
More information about the Gsl-discuss
mailing list