Class nesting??????

Hi,

Can any body tell me in the following statement what the function of the line 'class Memory *memory;' is? Is it some kind of nesting? I couldn't find a similar statement in documentation part.

class KLHM {
public:
class Memory *memory;
};

Any help would be appreciated.

Regards,
Sina
No. Class Memory is being forward declared, and memory is being declared as a pointer to Memory. That means the compiler doesn't need to know anything about Memory but its name. You can only use pointers with forward declarations, though.
Thanks a lot.
Topic archived. No new replies allowed.