title: How to have a Struct with template with a class
body: <p>With this code (just a class of test):</p>
  
  <pre><code>typedef unsigned short UInt16;
  
  template&lt;class T&gt;
  class CClass
  {
  public:
      SValue* getNewSValue(void);
  private:
      typedef struct {
          T *mValue;
          T *next;
          T *previous;
          UInt16 index;
      } SValue;
  };
  
  template&lt;typename T&gt;
  SValue* CClass&lt;T&gt;::getNewSValue(void)
  {
      return new SValue;
  }
  </code></pre>
  
  <p>I have the following errors:</p>
  
  <blockquote>
    <p>error C2143: syntax error : missing
    ';' before '*'</p>
    
    <p>error C4430: missing type specifier -
    int assumed. Note: C++ does not
    support default-int</p>
  </blockquote>
  
  <p>Is it possible to use a Struct within a class? If I declare the struct out of the class the template doesn't see the template <code>T</code>.</p>