If I do this.
Assume
struct life
{
char *nolife;
}
struct life **life;
// malloc initialization & everything
if(life->nolife[index] == 0)
Would I get error at life->nolife[index] if it is equal to 0.
wrong accession?
If I do this.
Assume
struct life
{
char *nolife;
}
struct life **life;
// malloc initialization & everything
if(life->nolife[index] == 0)
Would I get error at life->nolife[index] if it is equal to 0.
wrong accession?
Perhaps they may be something more in the initialization code. What is index?
The devil is often in the details, so please be explicit about how you are doing this.
Also, since life is a pointer to pointer to struct life,
then attempting to get a nolife member from it like this
is wrong and shouldn't compile.
spirtle is right nolife is a pointer to char while life is a pointer to pointer to struct so it shouldn't compile. And don't use same name for a structure tag and a dual level pointer.