I have a problem with this function. My program crashes when I try make my structure "f_table[x].table.u_value" point to my array of pointers.... Is this the correct way of making the assignement?
At the beginnig of the function I make my structure point to the first element of my array of pointers "f_table[0].table.u_id=a_p_ibuf[0];".
Code:
nt fill_inc_struct(char *a_p_ibuf[], FTABLE *f_table, int total)
{
int i=0, x=0;
f_table[0].table.u_id=a_p_ibuf[0];
for (i=0; i<total; i++)
{
printf(" Before assignment %s\n",a_p_ibuf[i] );
f_table[x].table.u_value=(int*)(a_p_ibuf+i);
x++;
i++;
printf(" TABLE %s \n", *(f_table[x].table.u_id));
}
return 1;
}
Many thanks.