Unusual Declaration Error
<p>This seems like a really easy fix, but I can't understand what it's coming from.</p>

<p>Any help fully appreciated!</p>

<p>The following 2 lines of code produce the following errors respectively.</p>

<pre><code>vector &lt;spades::player&gt; players(4, player());
vector &lt;spades::card&gt; deck(52,card());

error: 'player' was not declared in this scope
error: 'card' was not declared in this scope
</code></pre>

<p>Below is my card.cpp</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;sys/ioctl.h&gt;
#include &lt;cstdio&gt;
#include &lt;unistd.h&gt;
#include &lt;locale.h&gt;
#include &lt;ncursesw/ncurses.h&gt;

#include "card.h"
namespace spades {
card::card()
{
    cardSuit = 0;
    cardNum = 0;
}

card::card(int suit, int number)
{
    cardSuit = suit;
    cardNum = number;
}
}
</code></pre>

<p>Below is my player.cpp</p>

<pre><code>#include &lt;iostream&gt; // Stream declarations
#include &lt;vector&gt; //Vectors used to store deck and players hands
#include &lt;string&gt; //String declarations
#include &lt;algorithm&gt; //Shuffle Method
#include &lt;sys/ioctl.h&gt;
#include &lt;cstdio&gt;
#include &lt;unistd.h&gt;
#include &lt;locale.h&gt;
#include &lt;ncursesw/ncurses.h&gt;
#include "player.h"
namespace spades {
using namespace std;


player::player() {
    score =0; //total score
    bid = NULL; //bid for that round
    tricksTaken = 0; //score for thast round
    sandBag = 0; //the number of points you win, more than what you bid, every 10th bag = -100
    doubleNil = false;
    for(int i=0; i&lt;13; i++)
        hand.push_back(card());
}

void player::addCard(spades::card b){
    for (int i=0; i&lt;hand.size(); i++){
        //compare card being played to the ones in your hand to search and determine which one to erase
        if((hand.at(i).getCardNum() == 0) &amp;&amp;
            (hand.at(i).getSuit() == 0))
        {
            hand.at(i).setCardNum(b.getCardNum());
            hand.at(i).setSuit(b.getSuit());
            return;
        }
    }
}

void player::removeCard(spades::card a) {
    for (int i=0; i&lt;hand.size(); i++){
        //compare card being played to the ones in your hand to search and determine which one to erase
        if((hand.at(i).getCardNum() == a.getCardNum()) &amp;&amp;
            (hand.at(i).getSuit() == a.getSuit()))
        {
            hand.at(i).setCardNum(0);
            hand.at(i).setSuit(0);
            return;
        }
    }
}
}
</code></pre>
