Calling a Function From a String With the Function’s Name in C++

前端 未结 8 1113
故里飘歌
故里飘歌 2020-12-10 15:35

How can I call a C++ function from a string?

Instead of doing this, call the method straight from string:

void callfunction(const char* callthis, int         


        
8条回答
  •  情书的邮戳
    2020-12-10 16:28

    You could also look at the answers to How can I add reflection to a C++ application? for information about RTTI, the reflection mechanism in C++.

    Good luck.

提交回复
热议问题