"error: Expected a type, got 'classname'" in C++
<p>Using the following code:</p>

<pre><code>template &lt;typename T&gt;
class node {
    [. . .]
};
class b_graph {
friend istream&amp; operator&gt;&gt; (istream&amp; in, b_graph&amp; ingraph);
friend ostream&amp; operator&lt;&lt; (ostream&amp; out, b_graph&amp; outgraph);

public:

    [...]
private:
    vector&lt;node&gt; vertices; //This line
</code></pre>

<p>I'm getting:</p>

<pre><code> error: type/value mismatch at argument 1 in template parameter list for ‘template&lt;class _Tp, class _Alloc&gt; class std::vector’
 error: expected a type, got  'node'
 error: template argument 2 is invalid
</code></pre>

<p>On the indicated line. Node is clearly defined before b_graph which uses it - what have I done here?</p>
