title: How to build a constructor for a matrix type in C++
body: <p>I'm a beginner in C++, and as a learning exercise I'm trying to write a library for doing matrix math (matrix multiplication, invertion and the like).
  The first thing I want to do is to define a class "Matrix", which members are "rows"- the number of rows in the matrix, "cols"-the number of columns in the matrix, and "_matrix"-an array containing the elements of the matrix.
  The problem is I don't have any idea how to build the constructor.
  Can I write something like "Matrix(m,n,array)"? how do I make sure the array actually contains m*n elements?
  I would love some guidence on how to procceed (well.. how to begin if I'm being honest :) )</p>
  
  <p>thanks!</p>