If it is passed, is it passed by value or by reference?
void printMatrix(vector> *matrix);
...
vector> matr
Well, first of all, you're creating it wrong.
vector> matrix1(3, vector(3,0));
You can pass by value or by reference, or by pointer(not recommended). If you're passing to a function that doesn't change the contents, you can either pass by value, or by const reference. I would prefer const reference, some people think the "correct" way is to pass by value.
void printMatrix(const vector> & matrix);
// or
void printMatrix(vector> matrix);
// to call
printMatrix(matrix1);