Ghosty
Active member
Greetings people!
I know, the tittle sounds complicatted. Let me explain it with an example:
Let's supose I'm defining a library, and there I got a function like this:
void libFunction(<an external function as parameter>){
// some content
}
And outside of the library, someone needs the function above to execute/check/store_in_array/wathever another one, defined by them. Something like:
void userFunction(){
//yaddayadda
}
And calling it like: libFunction(userFunction());
Is that possible? If is, how? I know a way could be using pointers but no idea how they work with functions adresses :/
I know, the tittle sounds complicatted. Let me explain it with an example:
Let's supose I'm defining a library, and there I got a function like this:
void libFunction(<an external function as parameter>){
// some content
}
And outside of the library, someone needs the function above to execute/check/store_in_array/wathever another one, defined by them. Something like:
void userFunction(){
//yaddayadda
}
And calling it like: libFunction(userFunction());
Is that possible? If is, how? I know a way could be using pointers but no idea how they work with functions adresses :/