elusive c function declared in header -


here c file: http://simul.iro.umontreal.ca/rng/well19937a.c (i uncommented, l'ecuyer told to)

here c header: http://simul.iro.umontreal.ca/rng/well19937a.h

the question is: double (*wellrng19937a) (void) in c file?

i don't see it. exists. code works on tigcc yields 0.

#include "well44497a.h" #include <tigcclib.h> void _main(void)  {  unsigned int u=33337; initwellrng44497a(&u); //this function wants array of seeds don't have them.  double = wellrng44497a()  ; clrscr(); printf("%f",a); ngetchx();//wait keyboard input } 

deleting initwellrng44497a(&u) makes throw sigsegv (which assures me other function exists)

i greatful if tell me function. more, if tell me how use function.

ps. have nothing clarify anymore. stupid question, has been answered right. reason function giving zeroes time different.

double (*wellrng19937a) (void) pointer double funcname (void) function.

in first function

void initwellrng19937a (unsigned int *init)  

you can see

wellrng19937a = case_1;

where case_1 is

double case_1 (void)

then in main calling function poited wellrng19937a pointer. real called function case_1.

deleting initwellrng44497a(&u) makes throw sigsegv

this causes segfault because of initwellrng44497a init function pointer, otherwise pointer uninitialized.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -