I have this function order, which returnsvector<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 *> >'it seems that there is vector<Node*, <Node*>>or something is happening, but I can not understand this.
source
share