title: Vector unknown size
body: <p>I have a class Player which contains an instance variable: \</p>
  
  <pre><code>vector&lt;Card&gt; userCards;
  </code></pre>
  
  <p>In order to avoid any compilation errors I forward declared the class <code>Card</code>. However now when I try to Build Solution I get an error saying </p>
  
  <blockquote>
    <p>Card *: Unknown size. </p>
  </blockquote>
  
  <p>Basically I am trying to create a <code>Player</code> who contains a non-fixed number of cards, so I tried using a vector and now I cannot get it to work.</p>
  
  <p>Player.h</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  using std::string;
  using std::vector;
  
  #ifndef PLAYER_H_
  #define PLAYER_H_
  
  class Card;
  class Player {
  private:
      vector&lt;Card&gt; userCards;
  };
  #endif
  </code></pre>
  
  <p>Card.h</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using std::string;
  
  #ifndef CARD_H_
  #define CARD_H_
  
  class Card {
  private:
      string name;
      string type;
  
  public:
      Card(const string&amp; name, const string&amp; type);   
  };
  #endif
  </code></pre>
  
  <p>I have a bunch of different functions that are not related, so I did not include them.</p>