title: C function pointers with variable parameterisation and type
body: <p>I'm working on a game engine written in C, trying to use as little of the standard library as possible. For my in game &quot;objects&quot; I've got my version of &quot;abstract&quot; structures, reminiscent of object oriented languages like Java and C#, but I've got a problem when it comes to having objects that do things, i.e. they contain a set of functions. Is there a way that I can store (as a member of a structure) an array of function pointers that is of variable size, type, and parameterisation? Can I give up just one of these requirements, i.e. have all operational functions of void type? Or should I go back to the drawing board entirely? I'm assuming this will have to be dynamically allocated as well, but as far as I know that's standard for these sort of things, right? Thanks in advance</p>