Hi everyone,
I have a question that is tricking me.
I need to do something like this:
-----------------------------------------------------------
----------------------
I don't know if i explained it well but what I need is a function to call another functions by its adress. For example, I use call(&function2 ); then it runs all function2()
.
I have a question that is tricking me.
I need to do something like this:
-----------------------------------------------------------
Code:
int a;
void* function(const &function){
//execute the code of the function here that i sent the address
}
int main(){
a = 0 ;
call(&myFunction);
cout << a ;
}
I don't know if i explained it well but what I need is a function to call another functions by its adress. For example, I use call(&function2 ); then it runs all function2()
.
Comment