Jump to content
  • Advertisement
Sign in to follow this  
all_names_taken

Function pointers, C++

This topic is 3909 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

What can function pointers point to in C++? Which of the following would work: - static member of a class - member function of a specific object - the static-type virtual member function of a specific object - the dynamic-type virtual member function of a specific object

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by all_names_taken
- static member of a class


Yes.

Quote:
- member function of a specific object
- the static-type virtual member function of a specific object
- the dynamic-type virtual member function of a specific object


No. However, boost::bind could help you achieve this.

Share this post


Link to post
Share on other sites
Quote:
Original post by ToohrVyk
Quote:
- member function of a specific object
- the static-type virtual member function of a specific object
- the dynamic-type virtual member function of a specific object


No. However, boost::bind could help you achieve this.


Well, it'll help you store references to the above in, say, a boost::function, but it doesn't really help with a raw function pointer itself.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!