[Solved] elusive c function declared in header [closed]


double (*WELLRNG19937a) (void) is a pointer to a double funcname (void) function.

In the first function

void InitWELLRNG19937a (unsigned int *init) 

you can see

WELLRNG19937a = case_1;

where case_1 is

double case_1 (void)

Then in main you are calling a function poited by WELLRNG19937a pointer. The real called function will be case_1.

Deleting InitWELLRNG44497a(&u) makes it throw SIGSEGV

This causes segfault because of is InitWELLRNG44497a that init the function pointer, otherwise the pointer is uninitialized.

4

solved elusive c function declared in header [closed]