Is there any way to pass a reference to a structure without knowing what type of structure it is? For example:
Is there a pointer type that can hold a reference to one of these structures without knowing which one it is? Let's say I wanted one function to deal with both types:
Assuming I had a parameter to tell me which type of structure was being passed to it (e.g. an integer value), is there another parameter that would accept any reference? I tried to use void *, however I can't access the structure members with that. So is that possible within a single function, or would I need a separate function for each structure type?
Apologies if I haven't expressed myself clearly enough.
0 · ·