mathmari
Gold Member
MHB
- 4,984
- 7
I like Serena said:We will have to allocate some space for it. (Nod)
In C that is done with [m]malloc()[/m] or [m]calloc()[/m].
For instance:
It allocates memory for 1 element with the size of the [m]plansys_t[/m] structure.Code:plansys_t *plansystem = calloc(1, sizeof(plansys_t));
After this, you can follow the pointer safely. (Angel)
Ahaa... (Nerd)
I like Serena said:With [m]plansystem->solid=solid;[/m] you follow the pointer to its end and assign it a value. That's when it results in madness and chaos. (Evilgrin)
Could you explain me further why this is wrong?? (Wondering)