Skip to content
Guest Big Announcement

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

Featured Replies

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. 

Solved by Wowowowww

  • Author
  • Solution

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

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.