title: error: Illegal zero sized array
body: <p>I get this error:</p>
  
  <pre><code>error C2229: class 'GenerateRandNum&lt;int [],int&gt;' has an illegal zero-sized array    
  </code></pre>
  
  <p>In my main, I call my random generator function to input into a empty data set</p>
  
  <p>I call the method in my main like so:</p>
  
  <pre><code>//declare small array
  const  int smallSize = 20;
  int smallArray[smallSize];
  
  // call helper function to put random data in small array
  GenerateRandNum &lt;int[], int&gt; genData(smallArray, smallSize);
  genData.generate();
  </code></pre>
  
  <p>Header file</p>
  
  <pre><code>template &lt;class T, class B&gt;
  class GenerateRandNum
  {
  public:
  
      T data;
      B size;
  
  
      GenerateRandNum(T list, B length)
      {
          data = list;
          size = length;
      }
      void generate();
  
  };
  </code></pre>
  
  <p>File with method definition</p>
  
  <pre><code>template&lt;class T, class B&gt;
  void GenerateRandNum&lt;T, B&gt; ::generate()
  {
  
      for (B i = 0; i &lt; size; i++)
      {
          data[0] = 1 + rand() % size;
      }
  
  }
  </code></pre>