Hi,
I'm trying to write my own matrix math library (I have practical uses for it, but it's mostly an educational exercise) but I can't find the right syntex for what I'm trying to do:
I want the library to have a Matrix class which you can either declare like that:
Matrix C = {{1,2,3}
{4,5,6}};
Or like this:
Matrix C(2,3);
(and thanks to the stackoverflow users who helped me figure out exactly what I want )
I've tried looking into initializer lists, but I must be looking in the wrong direction, because I can't find any straight forward explanation for how to do something like that.
does anyone know a simple example for a constructor that does that?
thanks!