Declaring a Matrix template class
Contents
Matrix class using templates
So you already know the problems we faced already. The solution would be creating a class that can work with all (numeric) datatypes and provides the mathematical functions within itself. Fortunately using Template Classes we can easily achieve this.