Code:
int check(vector <node*> *n)
`n` is a
pointer to a std::vector<node*>. Because of this, you can't access its elements as
n[i], you have to dereference it first:
(*n)[i]. However, why use a pointer in the first place? I'm guessing it is because you wish to not copy the whole vector. A better way (IMO) would be:
Code:
int check(const vector<node *> &n)
Also, even though you've declared `check` to return
int, the function returns no value. Also, why is `check` a member of class `node` in the first place? You're also missing an equals sign on the line:
Code:
int ret e[0]->check(&e);