Store pointer to istream and ostream in a class C++
<p>game.h</p>

<pre><code>#ifndef GAME_H
#define GAME_H
#include &lt;string&gt;
#include &lt;iostream&gt;
#include "piece.h"

using namespace std;

class Game
{
    private:
        string white;
        string black;
        string title;
        istream* in;
        ostream* out;
    public:
        Game();
        Game(istream&amp;, ostream&amp;);
        void display(Colour, short);
};

#endif
</code></pre>

<p>game.cpp</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;sstream&gt;
#include "game.h"
#include "board.h"
#include "piece.h"

using namespace std;

Game::Game()
{
    //nothing
}

Game::Game(istream&amp; is, ostream&amp; os)
{
    in = is;
    out = os;
}

void Game::display(Colour colour, short moves)
{
    //out &lt;&lt; "a";
}
</code></pre>

<p>I'm trying to use the istream and ostream in other parts of my class but I can't because g++ won't let me reference is to in. Any ideas?</p>
