• Advertisement
Sign in to follow this  

Struct within a struct

This topic is 2458 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a struct like so;

struct TEST
{
int n;
struct DATA
{
int m;
};

DATA integerTest;
};


How can I access integerTest.m Can this even be done?

Share this post


Link to post
Share on other sites
Advertisement
a bit off-topic, but you can define integerTest variable like this also:



struct TEST
{
int n;
struct DATA
{
int m;
}integerTest;
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement