Jump to content

How to make a function pointer for a Static function with parameters


Go to solution Solved by Wowowowww,

2 posts in this topic

Recommended Posts

Posted

As in the title you should know my problem I’m trying to make a function pointer for a static function. I know static functions don’t have a instances so I’ll  show what I did


void (*premium)(bool a1);

so boom a static function with a bool parameter but when I try to compile I get a error saying undeclared identifier when I try to call it. So if anyone can assist me it would be great. 

  • Solution
Posted

Um never mind I’m mildly retarded I have fix my problem but for anyone else that need help in the future you have to return a value of the same type as the parameter for instance if a float you would return #.0f 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines