2

Is it possible to call a method by its name as string?

#define callmethod(function) \
this->#function();

Just a simple example. (it doesn't work).

callmethod("myfunction");

error: expected unqualified-id before string constant

yayuj
  • 2,194
  • 3
  • 17
  • 29

0 Answers0