when i debug the following code, the string copy copies fine but as soon as the loop exits the char**(parent_var_names) is pointing NULL/0xfdfdfddf I am puzzled?!
parent_var_names=(const char**)calloc(net->nodes[x]->num_parents,sizeof(const char*));
for(int i(1);i<net->nodes[x]->num_parents;++i)
{
parent_var_names[i]=(const char*)malloc(strlen(rhs_arr[net->nodes[x]->markov_parents[i]]));
strncpy((char*)parent_var_names[i],(char*)rhs_arr[net->nodes[x]->markov_parents[i]],strlen(rhs_arr[net->nodes[x]->markov_parents[i]]));
}