This explains very well why you cant have a CBox or a class as a member of itself VERY WELL
http://answers.yahoo.com/question/index?qid=20101228143726AALgIAt
This post:
------------------------------------------------------------------------------------------------
"I think the problem for you is that you're creating them inside the constructor. It's sort've like an indefinite recursion if you think about it. When you create a Person object in another class the constructor is automatically called. That constructor creates another Person object (father/mother). However, since you're creating another Person object then the constructor for that person object is getting called which, you guessed it, creates another Person object(father/mother again) and so on and so on until your computer blows up (or just gives the error message :)
I believe if you create some method that creates a Person object then it would work fine. Just take it out of the constructor.
Or better yet, take advantage of inheritance. Create a subclass of Person called Parent or something."
------------------------------------------------------------------------------------------------
Although why can you do it in function makes sense now, because it is not necessarily creating a new type of CBox every time its constructor is called/CBox is created, only when the function is called.
Although my first question has remained unanswerd so I am trying to find a answer to that.
Any help would be appreciated!