Hi all,
I am not an expert in C..more of an algorithm developer.
One of my algorithm requires use of multidimensiona l struct.
for example something like:
struct cell{
int row;
int col;
int computation;
int super_step_row;
int super_step_col;
int super_step;
int division;
int processor;
int message ;
int valid_row;
};
the problem is when i define a multidimensiona l array for above struct as:
struct cell cell1[3000][3000]
the program worked fine for struct size less than [200][200]..but i need a size of 3000 to 40000...
there is no compile errors but when i run the pgm for higher dimensions i get buffer/stack overflow errors and pgm just hangs..
Is there any way to circumvent this...like using pointers or something??
i know little about allocating multidimensiona l arrays by using arrays of single dimension using pointers..
but am not able to apply that method here...
can somebody help me...your help is much appreciated..
Thanks
I am not an expert in C..more of an algorithm developer.
One of my algorithm requires use of multidimensiona l struct.
for example something like:
struct cell{
int row;
int col;
int computation;
int super_step_row;
int super_step_col;
int super_step;
int division;
int processor;
int message ;
int valid_row;
};
the problem is when i define a multidimensiona l array for above struct as:
struct cell cell1[3000][3000]
the program worked fine for struct size less than [200][200]..but i need a size of 3000 to 40000...
there is no compile errors but when i run the pgm for higher dimensions i get buffer/stack overflow errors and pgm just hangs..
Is there any way to circumvent this...like using pointers or something??
i know little about allocating multidimensiona l arrays by using arrays of single dimension using pointers..
but am not able to apply that method here...
can somebody help me...your help is much appreciated..
Thanks
Comment