Original Post
Greetings, Using C++: is it a bad idea to try to pass a std::vector to a function as a pointer? Example: If this is a Bad Idea(tm), how should I pass a std::vector around? Thanks!
void Foo(std::vector<int>* pMyVector)
{
int num = 5;
(*pMyVector).push_back(num);
}
// From main...
std::vector<int> MyVector;
Foo(&MyVector);