title: C++ How to declare a vector in the header, set size in constructor, then access
body: <p>I am having issues declaring a vector in the header, setting the default size in the constructor, then making it a function to do stuff in aDie.cpp. My known error is under the aDie.cpp declaration is incompatible for <code>void aDie::Frequency(std::vector&lt;int&gt; Vector());</code>. Any help would be appreciated to get me going in the right direction so that I have a vector that I can add values into. My code is below. </p>
  
  <p>header aDie.h </p>
  
  <pre><code>#define aDie_H   
  #include &lt;vector&gt;
  class aDie {
  public: 
      int i = 0; 
      aDie();
      void numRolls();
      void getSeed();
      void roll(); 
      void Frequency(std::vector&lt;int&gt; Vector());
  
  
  private:
      int Rolls;
      int dSeed;
      int die1;
      int die2;
      int sum;
  
  }; 
  </code></pre>
  
  <p>cpp aDie.cpp </p>
  
  <pre><code>#include "aDie.h"  
  #include &lt;iostream&gt;  
  #include &lt;ctime&gt;  
  #include &lt;vector&gt;
  using namespace std;
  
  aDie::aDie() { //constructor sets values to default 0
      die1 = 0;
      die2 = 0;
      dSeed = 0;
      vector&lt;int&gt; Vector(6); //defaults to size six 
  }
  void aDie::numRolls() {
      cout &lt;&lt; "Enter number of times for die to be rolled: ";
      cin &gt;&gt; Rolls;
      return;
  }
  void aDie::getSeed() {  //gets seed 
      cout &lt;&lt; "Enter desired seed number: ";
      cin &gt;&gt; dSeed;
      srand(dSeed);
      return;
  }
  void aDie::roll() { //rng for one die
      die1 = 1 + rand() % 6;
  }
  void aDie::Frequency(std::vector&lt;int&gt; Vector()); //store the rolls output by aDie::roll
  
  
  }
  </code></pre>
  
  <p>.cpp Main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  #include "aDie.h"   
  #include "aHistogram.h"
  #include &lt;iostream&gt; 
  #include &lt;vector&gt;
  using namespace std;
  
  void game1();
  
  int main() {
      game1();
  
      system("Pause");
  }
  
  void game1() {
      int i = 0;
      int Rolls = 0;
  
      cout &lt;&lt; "Enter number of times for die to be rolled: ";
      cin &gt;&gt; Rolls;
  
      aDie Roll1; //calls default constructor
      Roll1.getSeed(); //calls seed  
  
      for (i = 0; i &lt; Rolls; i++) {
          Roll1.roll(); //rolls die
          Roll1.//whatever my vector will be called
  
      }
  }
  </code></pre>