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:
I define a function as follows:Code:typedef struct foo{ typedef struct poo{ }poo; typedef struct shoo{ }shoo; }foo;
I would like to pass a parameter such as:Code:void placeObject(foo object);
Then the function placeObject determines the type of foo object passed in but this is proving more difficult than I thought.Code:foo:poo object; placeObject(object);
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?



1Likes
LinkBack URL
About LinkBacks


