Here is a small--complete--program that includes a sub-routine that inputs two matrices and then multiplies them.
1) I happen to like taking input from a text file. It eliminates the need to type input from the console, especially when debugging, it prevents the possibility of making typos.
2) The sub-routine includes several checks to make sure the array sizes are correct. These checks are not necessary for this particular program, but the checks were added in case the sub-routine is ever copied and used somewhere other than this program.
3) To make the code more concise, I have used typedef to re-name vector<vector<double> > as "C2DArray".
4) This program also shows an example of two more aspects of C++ programming: (i) dynamic arrays using <vector>, and (ii) inputting data from a text file and putting it into arrays