I have a scenario where I've made a class, call it
myClass, and I've realized I need another class, call it
myOtherClass, which will be used inside of
myClass but not outside of it. I haven't taken a Computer Science class for years, so I can't remember the terminology for what I'm trying to get at. There is no inheritance going on; just that
myOtherClass, in fact builds a tree of
myOtherClass objects, and I want to encapsulate everything properly.
What is the concept I need to be following and what is it in C++ specifically? Please let me know if I need to try and make this question more clear.