A question about assigning structs to 2d struct array...
Code:
struct Init { This is the part is where I need help. Code:
init->Dptr->dptr = domain; |
Ah nevermind, I need an array of struct domain pointers
Code:
struct Domains { |
I need your help with syntax and maybe logic.
My struct looks like this Code:
struct Domains { So I am thinking that I would do a malloc for the struct pointer to increase the *dptr[] array by 1 and another malloc for the actual Domain struct. Is that correct? My pseudo ish code so far. Code:
Domain *domain = calloc(1, sizeof(struct Domain *)); // allocate memory for struct pointer Code:
struct Domain { |
Quote:
|
Awesome! Thank you for pointing me in the right direction.
|
All times are GMT -5. The time now is 10:23 AM. |