title: Template argument 2 and 1 is invalid - declaring vector
body: <p>I have A txt file which contains data on numerous post-secondary graduates. The records are formatted as follows: year province graduation gender numEmployed numGrads. Here is a part of the file:</p>
  <pre><code>2000 AB Bachelor's All 6900 7500
  2005 AB Bachelor's All 9300 10000
  2015 PE Bachelor's All 440 500
  2000 PE College All 728 800
  2005 AB Bachelor's Females 5642 6200
  2010 AB Bachelor's Females 5369 5900
  2015 BC Doctorate Females 188 200
  2010 BC Doctorate Males 285 300
  2005 CAN Bachelor's Males 33396 36300
  2000 CAN College Males 28569 32100
  </code></pre>
  <p>So in the first line 2000 is a year, AB is a province, and Bachelor's is the graduation variable</p>
  <p>In my ReportGenerator class, I am trying to declare a partial collection organized by year, one organized by province, and one organized by graduation/degree. Each partial collection is supposed to be defined as a collection of Property object pointers, and each Property object stores a collection that is a subset of the records in the primary data collection.</p>
  <p>Each element inside these partial collections will hold the records for one specific value of a Property. For ex: one of the properties is year so the ReportGenerator base class will contain a partial collection organized by year, which I called ‘years’ below. The data contains statistics for only four different years (2000, 2005, 2010, and 2015), so the years partial collection will contain exactly four elements, one for each year; the first element of the years collection will contain all the records for the year 2000; the second element will contain those for the year 2005, and so on for the years 2010 and 2015.</p>
  <p>year is an integer, and province and graduation are both strings as shown in the Record.cc class. I attempted to declare these 3 partial collections below in my ReportGenerator.h file, but I keep getting the errors:</p>
  <pre><code>ReportGenerator.h:25:27: error: template argument 1 is invalid
      static vector&lt;Property*&gt; years; 
                             ^
  ReportGenerator.h:25:27: error: template argument 2 is invalid
  ReportGenerator.h:26:27: error: template argument 1 is invalid
      static vector&lt;Property*&gt; provinces; 
                             ^
  ReportGenerator.h:26:27: error: template argument 2 is invalid
  ReportGenerator.h:27:27: error: template argument 1 is invalid
      static vector&lt;Property*&gt; graduation;
                             ^
  ReportGenerator.h:27:27: error: template argument 2 is invalid
  </code></pre>
  <p>I basically did the exact same thing for the records collection which is basically just an STL vector of Record pointers, but for some reason it doesn’t give me an error for this vector but it does for the other 3. I would really appreciate some help or a push in the right direction with fixing these errors.</p>
  <p>Record.h</p>
  <pre><code>#ifndef RECORD_H
  #define RECORD_H
  
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  class Record{
    public:
      Record(int = 0, string = &quot;Unknown&quot;, string = &quot;Unknown&quot;);
      ~Record();
      
      private:
          int year;
          string province;
          string graduation;
  };
  #endif
  </code></pre>
  <p>ReportGenerator.h</p>
  <pre><code>#ifndef REPORTGENERATOR_H
  #define REPORTGENERATOR_H
  
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;iterator&gt;
  #include &lt;algorithm&gt;
  using namespace std;
  
  #include &quot;Record.h&quot;
  #include &quot;Property.h&quot;
  
  class ReportGenerator{
    public:
      ReportGenerator();
      static void populate();
    
    protected:
      static vector&lt;Record*&gt; records;
      
      static vector&lt;Property*&gt; years; 
      static vector&lt;Property*&gt; provinces; 
      static vector&lt;Property*&gt; graduation;        
    
  };
  #endif
  </code></pre>
  <p>Property.h</p>
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  #include &lt;cstdlib&gt;
  
  template &lt;class T&gt;
  
  class Property{
      public:
           Property&amp; operator+=(const int);
           Property&amp; operator[](int);
      private:
  };
  </code></pre>
  <p>I should also mention that Property is a <strong>class template</strong>, so unlike the other classes there is no Property.cc file. It's just Property.h</p>