The function is as follows:

void Runthrough(double * from, double * to, double * when, double * howmuch)
nflows += 1;

if (nflows > LENFST)
{   /* Stack Overflow */
Application->MessageBox("Error occurred.", MB_OK);
{       /* Store the arguments in the stack */
flowstack[nflows].from = from;
flowstack[nflows].to = to;
flowstack[nflows].when = *when;
flowstack[nflows].amt = *howmuch;


when I call in the main program: Runthrough(a1,b1,time,amount), a1,b1,time,amount all defined as double, I got error message:

incompatible conversion, type mismatch, and cannot convert "long[*][long]" to "double". I don't use array here.

Can any one help to find the problem?


Could you include your whole code? It could be something in main.

The problem is that a1, b1, time, and amount are all defined as double, and your routine wants a pointer to double.

Call as:


Since this is C++, you could prototype your function as

void Runthrough(double &from, double &to, double &when, double &howmuch)

then you could call the function the way you were.

In either case, one line or the other must have &'s.

Please use code tags.

Hope this helps.