If a new type is declared whithin a class, like:
class foo {
public :
struct s1 {
int a ;
};
private :
struct s2 {
int b ;
};
};
then in what scope can the following statements be used:
s1 ss1;
s2 ss2;
Thanks in advance.
The type s1 can be used anywhere, but if used outside of foo’s member functions, it must be qualified:
The type s2 can only be used in member functions of foo.