hello, gurus,

I know that we can have member functions defined within a structure (rather than in a class), e.g. member functions can be defined inline, or just as a function pointer and we define the content of the function somewhere else.(Actually, i'm not quite sure about this, but since I really saw some code already doing this, so i think it should work anyway~~)

So, here is what i want do: first, I define the structure,say struct A, containing some member functions; then I allocate a piece of memory with the sizeof(A)(and fill it with 0s); then I get a pointer to that piece of memory. Now the problem is :What will happen when I cast that pointer to a pointer to struct A, and call:
pointer->oneFunctionOfA() ??
will this work? I mean will the system know where to find the content of that oneFunctonOfA() ? if yes, why?

I know this is a weird question, but I really want to know(since i see some code seems to be doing this kind of thing...).

thank you in advance