-
Nested Structures
I've tried a couple different ways to do this without success. Just trying to see if I overlooked anything?
The way I've been doing nested structures is like this:
Code:
struct a
{
/* blah blah blah */
};
struct b
{
/* whatever */
};
struct c
{
struct a z;
struct b y;
};
And then assign a variable for struct c in the main program. Is there a way to do it all at once? Such as:
Code:
struct c
{
struct a
{
/* blah blah blah */
};
struct b
{
/* whatever */
};
};
I tried to do it like above and the compiler doesn't complain until I try to access the variables inside of a. Any tips/suggestions?
-
Nevermind, figured it out. I love how asking a question (by typing or speaking it) and jar loose some information.
If anyone is interested:
Code:
struct
{
struct
{
/* blah blah blah */
}a;
struct
{
/* whatever */
}b;
}c;
-
>I love how asking a question (by typing or speaking it) and jar loose some information.
A teddy bear sits on top of my monitor (at work and at home) to provide such services when I need them.