For this problem, it might be simpler to begin with a code extract:

Code:
class Pattern
{
public:
   struct ChildPattern
   {
       Pattern pattern; 
       int offset;
   };
};
Instances of "ChildPattern" are going to be kept in lists and the like, and "offset" is something associated with instances of Pattern but it is not intrinsic to them (i.e. it shouldn't be part of the class, except as a hack).

Anyway the problem is that the above code doesn't compile. I get
Pattern::ChildPattern:: pattern uses undefined class 'Pattern'
.
Any suggestions? I don't want to change the first struct element to "Pattern * pPattern" if I can help it: the class is simple and I don't want to add new() and delete() unnecessarily.