Fügen Sie verschachtelter Vektor CPP hinzu
graph.push_back(vector<Neighbor>()); // add one element
...
Precious Penguin
graph.push_back(vector<Neighbor>()); // add one element
...