Maybe you should actually read what references are and what they do.
Type: Posts; User: Elysia
Maybe you should actually read what references are and what they do.
You can pass by reference.
void foo(std::vector<T>& myvector)
{
myvector.push_back(/*blah*/);
}
std::vector<T> myvec;
foo(myvec);
I don't understand what you are trying to point out.
It's up to your function whether or not it will modify the data passed as arguments or not. Pass a const reference if you don't want it to modify...
Your function takes vectors. Why are you trying to pass pointer to pointers to elements to it?