Hi All,

Sorry - this is my second nested data structure post today

Code:
struct base
{
        char *string;
};

struct parent
{
        struct base my_base;
};

int main()
{
        struct parent *my_parent;
        char temp_string[] = "temp string for test";

        my_parent->my_base.string = temp_string;

        printf("String = %s\n",my_parent->my_base.string);

        return 0;
}
I want to point the base char array at an existing string. Why does this cause problems?

Thanks again,

rotis23