Hi,

I'm stuck on something and was wondering if I could get some advice!

OK I'm passing a double *array1 and a double **array2 to a function pointer array like this:

void func1(double *array1, double **array2, int i){
array2[0][i] = array1[0];
array2[1][i] = array1[1];
array2[2][i] = array1[2];
array2[3][i] = array1[3];
}

I'm calling func1 from a function pointer array like this:

function_pointer[0](array1, array2, i);

The problem is that array2 never gets populated with whatever is in array1, as func1 prescribes. It seems to be working when I'm looking at the values in debug mode, inside func1, but when I check the values of array2 after I've called func1 they're just 0.0!

Anyone know what's going on? There are no compile errors at all.

Cheers,
Adam

Your not posting enough information to diagnose your problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.