Dear All,
I am a C code to calculate prices in stock market.
I pass a two dimensional array to a function as
#define DIM 3000
void grid(double tree[][DIM]);
int main(){
double tree[DIM][DIM];
grid(tree );
return 0;
}
void grid(double tree[DIM][DIM]){
/* and do sutff on tree *
}
Since tree is a large 2D array, 3000*3000, should be afraid about memory duplication when tree[][] is being passed as an argument to function grid().
I actually was afraid of that, and I wrote a reference & to the argument, but the compiler gave an error for that and did not accept that.
Thanks for your help.
Yours
Habib.