yes i got what you were trying to say..
but i just found that declaring any more pointers in my program causes seg. fault...
here's the code...
if i delelte any one of the colored part the seg....
Type: Posts; User: zoso123
yes i got what you were trying to say..
but i just found that declaring any more pointers in my program causes seg. fault...
here's the code...
if i delelte any one of the colored part the seg....
hi.. i ve been rtying to do what u said..
but it gives me segmentation fault as soon as i try to declare another pointer..
am i missing something here..
hey thanks that worked.. but i am unable to rewind the pointer.. how do i do that?
can you elaborate..
afaik malloc is used for pointers..
i couldnt find its use to initialize arrays...
i want to define arrays with different sizes..
something like this..
struct block{
int id;
int points[3];
int cells[3];
struct covar covariant[cells[0]][cells[1]][cells[2]];
thanks for the help guys..
are the pointers also initialized to NULL?
the following code is giving me the error:
syntax error before '.' token
struct point zero;
zero.location[0]=0;
zero.location[1]=0;zero.location[2]=0;...
@Dave_Sinkula:
your suggestion works.. but doesnt it reduce the efficiency of program since you have to pass the an array to a function.. my program needs very high efficiency and hence i am looking...
hmm..i m a little confused.. in this case.. if i have to pass the array to another function can i just pass the pointer?
i think this may work..
thanks..
i have the following chunk of code..
struct covar covariant[zeta_i][zeta_j][zeta_k];
struct covar ***p_covariant;
**p_covariant=&covariant[0][0][0];
but it is giving seg fault while...