I have a function like this:
void Foo(std::vector<bool> Visited, int actual element);
I actually use this function for a BFS in a Graph, but it goes in an infinite loop. I suspect it always creates a copy of the Visited vector. How do I make it change the vector, which is declared and initialized somewhere in main? And am I right with the whole "makes a copy" theory?
How do I use a pointer to an object, as I think <vector>
is an object?