C++ Pass a hidden arg to a class constructor?
- by JP
I would like to define a class that accept the pointer to it's parent class as an Argument, but would it be possible to somehow pass it without needing to pass it directly such as:
class Child
{
public:
Child(Parent* hiddenArg);
};
class Parent
{
public:
Child myChild;
};
I know this is weird, but I am making my own Signal/Slot implementation and Child would be a signal defined, but I would like to get the parent so I can use it's Event Dispatcher...