title: How to convert a string to a class name
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1096700/c-instantiate-class-from-name">C++: instantiate class from name?</a>  </p>
  </blockquote>
  
  
  
  <p>For example, if I have </p>
  
  <pre><code>string s = "myObject";
  </code></pre>
  
  <p>So how can I use that String s to make this one?</p>
  
  <pre><code>return new myObject();
  </code></pre>
  
  <p>I tried this one but it's quite silly and it's wrong</p>
  
  <pre><code>return new s();
  </code></pre>
  
  <p>Thank you</p>