| Imadatobanisa2 (2) | |
|
Hi everybody again! Some questions I asked yesterday were interrupted. I only have some questions with boost library... coder777 : I still believe void* definition can be anything. So, a few questions : - Can the boost function member variable be converted into a void* address value?- Is the boost variable a structure or a number? - Could you please show me an example "How to get (copy) the address of the function member, store the result into a void* then print the output function address properly?" :) | |
|
Last edited on
|
|
| cire (2347) | |
| Perhaps you could move your programming questions to a more appropriate forum. | |
|
|
|
| computerquip (1997) | |||
1. You can do something icky like this:
Of course, you can use bind to bind instances to member functions instead of using a lamda. 2. Boost Variable? I'm not sure what you mean unless you mean the variant. 3. Mission accomplished in 1. | |||
|
Last edited on
|
|||
| Imadatobanisa2 (2) | |||||||
Yeah, I see your solution, and I've just searched your new function definition : int(*lamFunc)()Great! It's much simpler than template. A great invention!!!!!!! And more importantly, the variable is completely able to be converted into an address value. I'll only need to declare a void* variable, define an another function variable which must correspond with the function member's syntax, then store the member address. Finally convert it into a void*. See this : void NUMBER::PRINT(void){printf("bla bla bla");}Optimized solution :
And at least I don't have to write :
-> ??? printf("The NUMBER::PRINT address : 0x%X\n",function_address); | |||||||
|
Last edited on
|
|||||||