title: How to evaluate a string which contains code and run it in C++?
body: <p>I'm looking for a way to parse a string for any valid C++ code, and then run it somehow. In particular, math functions like <code>sin()</code> or <code>cos()</code>.</p>
  
  <p>The basic method of parsing every single character doesn't extend to expressions with multiple math functions.</p>
  
  <p>Is there a way to parse and evaluate code from within a std::string?</p>