Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Q) Function pointers and usage
#1
Yet another question i have :lol: (this time i want to implement this)
"How do you declare and use function pointers in user-defined types?"

Example:
Code:
Copy      Help
struct {
,int a;
,function* pfunc;
,ARRAY(function*) apfunc;
} var;
I want to assign the address of some function, user-defined classmember of some class, to var.pfunc and/or var.apfunc[i], and then use that variable to call the assigned function.
How would i do this all?

I searched in help but only reference i could find was using callback functions for pre-made functions, which didnt cover my question enough for me to use it myself.
Only relevant part was that you can get function adress using &, but not how to declare and use it for self...
Well thats all for now, 3M


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)