使用以下代码:
template <typename T>
class node {
[. . .]
};
class b_graph {
friend istream& operator>> (istream& in, b_graph& ingraph);
friend ostream& operator<< (ostream& out, b_graph& outgraph);
public:
[...]
private:
vector<node> vertices; //This line
Run Code Online (Sandbox Code Playgroud)
我越来越:
error: type/value mismatch at argument 1 in template parameter list for ‘template<class _Tp, class _Alloc> class std::vector’
error: expected a type, got 'node'
error: template argument 2 is invalid
Run Code Online (Sandbox Code Playgroud)
在指定的行上.在b_graph使用它之前明确定义了节点 - 我在这做了什么?
c++ ×1