Merry Christmas and a Happy New Year. This board is an invaluable resource and I thank you all throughout the year for your support.
Now, onto my question, I have defined a nested structure as follows:
Code:
typedef struct foo{
typedef struct poo{
}poo;
typedef struct shoo{
}shoo;
}foo;
I define a function as follows:
Code:
void placeObject(foo object);
I would like to pass a parameter such as:
Code:
foo:poo object;
placeObject(object);
Then the function placeObject determines the type of foo object passed in but this is proving more difficult than I thought.
It appears I would have to overload placeObject with each scoped inner struct such as placeObject(foo::shoo do) but not sure I have to do that. Any ideas on how placeObject can have a type foo argument and figure out the inner struct type used?