Calling a Function From a String With the Function’s Name in C++
<p>How can I call a C++ function from a string?</p>

<p>Instead of doing this, call the method straight from string:</p>

<pre><code>void callfunction(const char* callthis, int []params)
{
  if (callthis == "callA"
  {
    callA();
  }
  else if (callthis == "callB")
  {
    callB(params[0], params[1]);
  }
  else if (callthis == "callC")
  {
    callC(params[0]);
  }
}
</code></pre>

<p>In C# we'd use typeof() and then get the method info and call from there... anything we can use in C++? ~ Thanks!</p>
