Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Universal Function Pointer

This topic is 5798 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey- I''m trying to create a plugin system that has no requirements on the return types or parameters. I was wondering if there was any way to have one definition of a function pointer that will be able to point to any function or if there is any other way to create the desired effect. I''ve tried using linked lists of void pointer data, but programming that becomes a mess, so if anybody knows a better way I''d love to hear it. Thanks..

Share this post

Link to post
Share on other sites
typedef int (*PointerToAnything)(...);

that will be ok with anything that returns a 32-bit value, including pointers, but if you want to return structs by value you're (i think) out of luck.

[edited by - niyaw on December 7, 2002 2:23:02 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!