0

How can I replace a pointer pointing to a function?

I made a function and one of the parameters is a pointer [typedef bool (*Condition) (int value)]. At this point, I am trying to replace that, but also maintain a dynamic bool parameter. Any ideas? Thanks a lot.

11th Jun 2016, 11:00 PM
Boris Vigotskij
Boris Vigotskij - avatar
1 Respuesta
0
You can't. A pointer is pointing to a adress from a place in the memory. The only ones who ARE inside that memory are variables. Function are just a way to put together more method. So... Because the variable are the only ones that can hold memory, y printers can only point to variables. I hope I helped you. :)
13th Jun 2016, 6:10 AM
Andrei Cîrpici
Andrei Cîrpici - avatar