Archived

This topic is now archived and is closed to further replies.

mrtuti_17

Struct in a Class

Recommended Posts


class foo{
public:
char c;
private:
struct bar{
int a;
int b;
};
}


Within foo you can create instances of bar and use them normally, you just can''t use them outside of foo. Had bar been declared as public, you could declare stuff like foo::bar b;

Share this post


Link to post
Share on other sites