sinacetiner
asked on
malloc in unix
hi i wrote a program in mandrake 9.1 version. ı had to use two dimensional array
char **inputdata;
int count;
inputdata = (char**)malloc(10*sizeof(c har));
works correctly but after this ı wrote
for(count=0;count<9;++coun t)
inputdata[count] = (char*)malloc(5*sizeof(cha r));
first allocation step wroks correctly(for char**) but second doesnt.
there is no compile mistake.also this code works in mandrake 9.1 version but because of malloc problem it does not work my school's unix server. ı tried many ways.
if any one interests with whole code ı can send. pls mail at sinacetiner@yahoo.com for whole code
char **inputdata;
int count;
inputdata = (char**)malloc(10*sizeof(c
works correctly but after this ı wrote
for(count=0;count<9;++coun
inputdata[count] = (char*)malloc(5*sizeof(cha
first allocation step wroks correctly(for char**) but second doesnt.
there is no compile mistake.also this code works in mandrake 9.1 version but because of malloc problem it does not work my school's unix server. ı tried many ways.
if any one interests with whole code ı can send. pls mail at sinacetiner@yahoo.com for whole code
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> inputdata = (char**)malloc(10*sizeof(c
inputdata = (char**)malloc(10*sizeof(c
Cheers!
Sunny:o)