For instance I have
class A { public: int x, y; int(*func)(); }; and I would like to make that func be something like
int main() { A a; a.func = [this](){return x + y;}; } or something like that. That would mean that I can create method "func" during runtime and decide what it is. Is it possible in C++?