Is there a way to make a class visible only from within another class. i.e:
class myclass
{
private:
class anotherclass
{
//stuff that only can be used from within a myclass function
void dosomething();
float dosomethingelse();
}*anotherclasses;
int numanotherclasses;
public:
int createanotherclass();//creates anotherclass object, puts it in the array and returns its index
void dosomething(int index);
float dosomethingelse(int index);
};
But in this example I would need to be unable to make an anotherclass from outside of myclass. Is this possible and if so what is the syntax for it?