J
Joolz
Could someone please give me an example of how to make pointers to
nested structures? Pointers to normal structures are no problem...
struct structA {
int a;
}structA_s;
structA *pStructA = &structA_s;
But when I've got a nested structure, I can't make a pointer to that
structure.
struct structA {
int a;
struct structB {
int b;
}structB_s;
}structA_s;
structA *pStructA = &structA_s;
Now how do I make a pointer to an object of structB? I -can- reference
members of an object of a nested struct with i.e
pStructA->structB_s.b but that's without pointers.
Thanks in advance.
Jules
nested structures? Pointers to normal structures are no problem...
struct structA {
int a;
}structA_s;
structA *pStructA = &structA_s;
But when I've got a nested structure, I can't make a pointer to that
structure.
struct structA {
int a;
struct structB {
int b;
}structB_s;
}structA_s;
structA *pStructA = &structA_s;
Now how do I make a pointer to an object of structB? I -can- reference
members of an object of a nested struct with i.e
pStructA->structB_s.b but that's without pointers.
Thanks in advance.
Jules