How would I copy an array that is made in a constructor into external arrays outside of the class and then use those copies for operator overloading?
I am trying to overload operators for matrices, If you look at the end of my code you can see i already have successfully overloaded the << operator using the matrix in the class. The problem is I need to do it with more than one matrix so I think I will need to call the constructor more than once and assign the matrix it creates to external matrices. Not sure how to copy the class array to though
if (0 > rangeIn && rangeIn > 20) This will never be true. rangeIn can't be both less than zero and more than 20 at the same time. You should replace && with ||.
When you overload operator + for two matrices, your code will be
1 2
matrix a(10, 20), b(10, 20);
matrix c = a + b;
Constructor is called for the object that is being declared. You don't need to copy anything yourself.