title: C++ class type as argument
body: <p>If I have an interface and many classes that implement this interface, can I now pass as argument only the type of the class and not the object?</p>
  
  <p>something like this:</p>
  
  <pre><code>Interface *creatClass(class : Interface){
      return new class();
  }
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>template &lt;class T&gt;
  IFrame *creatClass(){
      return new T();
  }
  
  void dfg(){
      IFrame *lol = creatClass&lt;Button&gt;();
  }
  
  error C3206: 'creatClass' : invalid template argument for 'Dist_Frame', missing template argument list on class template 'Button'
  </code></pre>
  
  <p>PS.  <code>Button</code> inherits <code>IFrame</code> </p>