I have this function, order
, which returns vector<Node*>
vector<Node*> order(vector<string> nodes, vector<pair<string, string>> dependencies) {
Graph graph = buildGraph(nodes, dependencies);
vector<Node*> order = buildOrder(graph.getNodes());
return order;
}
and I call it like this:
vector<Node*> order2 = order(nodes, deps);
However, the compiler gives this error:
error: type 'std::__1::vector<Node *, std::__1::allocator<Node *> >' does not provide a call operator
vector<Node*> order2 = order(nodes, deps);
^~~~~
1 error generated.
What is going wrong? 'std::__1::vector<Node *, std::__1::allocator<Node *> >'
seems to suggest that there is a vector<Node*, <Node*>>
or something going on, but I can't seem to figure this out.
Aucun commentaire:
Enregistrer un commentaire