Q: Pointer to array as a whole I have 4 arrays that I need to combine into 1 by adding all the corresponding cells. So I would add up Cell 1,1 (row 1, column 1) of all 4 matrices and put that into Cell 1,1 of the resultant matrix.
Well the 4 matrices are coming from another program and instead of writing an adder function that takes 4 matrices as the argument, I just had 1 vector. So my function looks like this:
void combine_matrix(vector<int*> all_arrays) {
    vector<int> cell_values; //Vector that stores the value of a particular cell of each matrix

    for (int i = 0; i<all_arrays[0].size(); i++)
}

vector<int*> all_arrays is a vector of pointers that points to the 4 arrays. This way, the matrices can be of any size (all 4 have to be the same dimensions though) and the function would still work.
Basicaly I want a vector of pointers pointing to the array as a whole so I can use the size() function but all the examples I've seen are only giving me pointers to the actual elements in the matrix. Any idea on how to do what I need? Thanks

A: Make a Matrix class that contains the pointer to array and the size and other things you might need to work with, and even better, make a CombinedMatrix class that contains vector<Matrix>
